Oops2 #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
- push | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build PDF | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Update Ubuntu package lists | |
run: sudo apt update | |
- name: Install Ubuntu packages | |
run: > | |
sudo apt install | |
fonts-anonymous-pro | |
fonts-noto-core | |
- name: Install tools | |
run: | | |
mkdir -p "$HOME/.local/bin" | |
cd "$HOME/.local/bin" | |
curl -L https://github.com/typst/typst/releases/download/v0.10.0/typst-x86_64-unknown-linux-musl.tar.xz | tar -xJ --strip-components=1 typst-x86_64-unknown-linux-musl/typst | |
curl -L https://github.com/casey/just/releases/download/1.22.0/just-1.22.0-x86_64-unknown-linux-musl.tar.gz | tar -xz just | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install Font Awesome | |
run: | | |
mkdir -p "$HOME/.fonts" | |
curl -L https://github.com/FortAwesome/Font-Awesome/releases/download/6.5.1/fontawesome-free-6.5.1-desktop.zip -o fontawesome.zip | |
unzip -j fontawesome.zip 'fontawesome-free-6.5.1-desktop/otfs/*' -d "$HOME/.fonts" | |
fc-cache | |
- run: just build | |
- name: Upload built PDF | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pdf | |
path: gbctr.pdf | |
deploy: | |
name: Deploy PDF | |
needs: [build] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Update Ubuntu package lists | |
run: sudo apt update | |
- name: Install Ubuntu packages | |
run: sudo apt install awscli | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: eu-west-1 | |
- name: Download built PDF | |
uses: actions/download-artifact@v4 | |
with: | |
name: pdf | |
path: gbctr.pdf | |
- name: Upload to S3 | |
run: | | |
aws s3 cp gbctr.pdf s3://gbdocs.gekkio.fi/gbctr.pdf |