Skip to content

Commit

Permalink
[bazelcon23] upload pdf to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ghorbanzade committed Nov 10, 2023
1 parent 9efd7d9 commit 0d171e7
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/path-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ cppcon23:
- '.github/path-filters.yml'
- '.github/workflows/pages.yml'
- 'slides/cppcon23/**'

bazelcon23:
- '.github/path-filters.yml'
- '.github/workflows/pages.yml'
- 'slides/bazelcon23/**'
45 changes: 45 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,50 @@ jobs:
path: ${{ github.workspace }}/cppcon21.tar.gz
retention-days: 1

build-bazelcon23:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: .github/path-filters.yml
- name: authenticate to aws
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE }}
if: steps.changes.outputs.bazelcon23 == 'true'
- name: Prepare final artifact
run: |
mkdir -p ./dist/bazelcon23/images
mv ./slides/bazelcon23/redirect.html ./dist/bazelcon23/index.html
mv ./slides/bazelcon23/slides-bazelcon23-pejman.pdf ./dist/bazelcon23/
mv ./slides/bazelcon23/images/bazelcon-cover.png ./dist/bazelcon23/images/
tar -zcf bazelcon23.tar.gz ./dist
if: steps.changes.outputs.bazelcon23 == 'true'
- name: push api to aws
run: aws s3 cp bazelcon23.tar.gz ${{ secrets.AWS_BUCKET }}/
if: steps.changes.outputs.bazelcon23 == 'true'
- name: pull api from aws
run: |
aws s3 cp ${{ secrets.AWS_BUCKET }}/bazelcon23.tar.gz .
tar -zxf bazelcon23.tar.gz .
if: steps.changes.outputs.bazelcon23 == 'false'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bazelcon23
path: ${{ github.workspace }}/bazelcon23.tar.gz
retention-days: 1

bundle:
runs-on: ubuntu-latest
needs:
- build-cppcon21
- build-cppcon23
- build-bazelcon23
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -147,10 +186,16 @@ jobs:
with:
name: cppcon23
path: ${{ github.workspace }}
- name: Download BazelCon23 artifact
uses: actions/download-artifact@v3
with:
name: bazelcon23
path: ${{ github.workspace }}
- name: Add redirect page
run: |
tar -xf cppcon21.tar.gz
tar -xf cppcon23.tar.gz
tar -xf bazelcon23.tar.gz
mv ./slides/redirect.html ./dist/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"cSpell.words": ["Ghorbanzade", "heroicons", "Pejman"]
"cSpell.words": ["bazelcon", "cppcon", "Ghorbanzade", "heroicons", "Pejman"]
}
13 changes: 13 additions & 0 deletions slides/bazelcon23/redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html>
<head>
<meta
http-equiv="refresh"
content="0;
url='https://pejman.dev/talks/bazelcon23/slides-bazelcon23-pejman.pdf'"
/>
</head>
<body>
<p>Redirecting...</p>
</body>
</html>
Binary file added slides/bazelcon23/slides-bazelcon23-pejman.pdf
Binary file not shown.

0 comments on commit 0d171e7

Please sign in to comment.