-
Notifications
You must be signed in to change notification settings - Fork 393
33 lines (31 loc) · 1001 Bytes
/
generate_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: generate-release
on:
push:
branches:
- master
jobs:
generate_release:
runs-on: ubuntu-latest
name: Generate release.
steps:
- name: Checkout project.
uses: actions/checkout@v2
- name: Build Docker image.
run: |
docker/build.sh cheats-box
- name: Generate PDF.
run: |
docker run \
--rm \
--volume $PWD:/workspace/cheats.rs \
--cap-add=SYS_ADMIN \
cheats-box ./generate_pdf.sh cheats.rs/rust_cheat_sheet.pdf
- name: Configure AWS credentials.
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload PDF to S3.
run: |
aws s3 cp rust_cheat_sheet.pdf s3://cheats.rs/rust_cheat_sheet.pdf