Skip to content

Commit 0d171e7

Browse files
committed
[bazelcon23] upload pdf to pages
1 parent 9efd7d9 commit 0d171e7

File tree

5 files changed

+64
-1
lines changed

5 files changed

+64
-1
lines changed

.github/path-filters.yml

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ cppcon23:
77
- '.github/path-filters.yml'
88
- '.github/workflows/pages.yml'
99
- 'slides/cppcon23/**'
10+
11+
bazelcon23:
12+
- '.github/path-filters.yml'
13+
- '.github/workflows/pages.yml'
14+
- 'slides/bazelcon23/**'

.github/workflows/pages.yml

+45
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,50 @@ jobs:
129129
path: ${{ github.workspace }}/cppcon21.tar.gz
130130
retention-days: 1
131131

132+
build-bazelcon23:
133+
runs-on: ubuntu-latest
134+
steps:
135+
- name: Checkout
136+
uses: actions/checkout@v3
137+
- uses: dorny/paths-filter@v2
138+
id: changes
139+
with:
140+
filters: .github/path-filters.yml
141+
- name: authenticate to aws
142+
uses: aws-actions/configure-aws-credentials@v4
143+
with:
144+
aws-region: ${{ secrets.AWS_REGION }}
145+
role-to-assume: ${{ secrets.AWS_ROLE }}
146+
if: steps.changes.outputs.bazelcon23 == 'true'
147+
- name: Prepare final artifact
148+
run: |
149+
mkdir -p ./dist/bazelcon23/images
150+
mv ./slides/bazelcon23/redirect.html ./dist/bazelcon23/index.html
151+
mv ./slides/bazelcon23/slides-bazelcon23-pejman.pdf ./dist/bazelcon23/
152+
mv ./slides/bazelcon23/images/bazelcon-cover.png ./dist/bazelcon23/images/
153+
tar -zcf bazelcon23.tar.gz ./dist
154+
if: steps.changes.outputs.bazelcon23 == 'true'
155+
- name: push api to aws
156+
run: aws s3 cp bazelcon23.tar.gz ${{ secrets.AWS_BUCKET }}/
157+
if: steps.changes.outputs.bazelcon23 == 'true'
158+
- name: pull api from aws
159+
run: |
160+
aws s3 cp ${{ secrets.AWS_BUCKET }}/bazelcon23.tar.gz .
161+
tar -zxf bazelcon23.tar.gz .
162+
if: steps.changes.outputs.bazelcon23 == 'false'
163+
- name: Upload artifact
164+
uses: actions/upload-artifact@v3
165+
with:
166+
name: bazelcon23
167+
path: ${{ github.workspace }}/bazelcon23.tar.gz
168+
retention-days: 1
169+
132170
bundle:
133171
runs-on: ubuntu-latest
134172
needs:
135173
- build-cppcon21
136174
- build-cppcon23
175+
- build-bazelcon23
137176
steps:
138177
- name: Checkout
139178
uses: actions/checkout@v3
@@ -147,10 +186,16 @@ jobs:
147186
with:
148187
name: cppcon23
149188
path: ${{ github.workspace }}
189+
- name: Download BazelCon23 artifact
190+
uses: actions/download-artifact@v3
191+
with:
192+
name: bazelcon23
193+
path: ${{ github.workspace }}
150194
- name: Add redirect page
151195
run: |
152196
tar -xf cppcon21.tar.gz
153197
tar -xf cppcon23.tar.gz
198+
tar -xf bazelcon23.tar.gz
154199
mv ./slides/redirect.html ./dist/index.html
155200
- name: Upload artifact
156201
uses: actions/upload-pages-artifact@v1

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"cSpell.words": ["Ghorbanzade", "heroicons", "Pejman"]
2+
"cSpell.words": ["bazelcon", "cppcon", "Ghorbanzade", "heroicons", "Pejman"]
33
}

slides/bazelcon23/redirect.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta
5+
http-equiv="refresh"
6+
content="0;
7+
url='https://pejman.dev/talks/bazelcon23/slides-bazelcon23-pejman.pdf'"
8+
/>
9+
</head>
10+
<body>
11+
<p>Redirecting...</p>
12+
</body>
13+
</html>
2.45 MB
Binary file not shown.

0 commit comments

Comments
 (0)