github: Run AWS upload on older ubuntu #43
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: Build (master) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build.yml | |
| deploy-pages: | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v1 | |
| deploy-aws: | |
| needs: build | |
| # It seems awscli disappeared in 24.04 (it seems to be back in later versions). | |
| # For now, running this on an older ubuntu. | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - run: sudo apt-get update | |
| - run: sudo apt-get install awscli | |
| - uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: github-pages | |
| - run: | | |
| mkdir pages | |
| tar xf artifact.tar -C pages | |
| - name: aws s3 sync | |
| run: | | |
| aws configure set region eu-central-1 | |
| aws configure set aws_access_key_id ${{secrets.AWS_ACCESS_KEY_ID}} | |
| aws configure set aws_secret_access_key ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
| aws s3 sync pages/ s3://${{secrets.AWS_SITE_BUCKET}}/waforth/ |