Repository navigation
Set endpoint URL using env #98
This file contains hidden or 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 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Update Ubuntu package lists | |
| run: sudo apt update | |
| - name: Install Ubuntu packages | |
| run: > | |
| sudo apt install | |
| fonts-anonymous-pro | |
| fonts-noto-core | |
| - uses: jdx/mise-action@v3 | |
| - name: Install Font Awesome | |
| run: | | |
| mkdir -p "$HOME/.local/share/fonts" | |
| curl -L "https://github.com/FortAwesome/Font-Awesome/releases/download/${FONTAWESOME_VERSION}/fontawesome-free-${FONTAWESOME_VERSION}-desktop.zip" -o fontawesome.zip | |
| unzip -j fontawesome.zip "fontawesome-free-${FONTAWESOME_VERSION}-desktop/otfs/"'*' -d "$HOME/.local/share/fonts" | |
| fc-cache | |
| env: | |
| FONTAWESOME_VERSION: 7.2.0 | |
| - run: just build | |
| - name: Upload built PDF | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pdf | |
| path: gbctr.pdf | |
| deploy: | |
| name: Deploy PDF | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Install Ubuntu packages | |
| run: sudo snap install aws-cli --classic | |
| - name: Download built PDF | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pdf | |
| - name: Upload to S3 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} | |
| AWS_ENDPOINT_URL_S3: ${{ secrets.S3_ENDPOINT }} | |
| run: | | |
| aws s3 cp gbctr.pdf s3://${{ secrets.S3_BUCKET }}/gbctr.pdf |