cd: pantry.tgz #1137
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: cd | |
run-name: "cd: pantry.tgz" | |
on: | |
push: | |
branches: main | |
paths: | |
- projects/**/* | |
- .github/workflows/cd.pantry.tgz.yml | |
# FIXME: https://github.com/pkgxdev/pkgx/issues/1021 | |
# run this nightly to ensure the tarball date is refreshed | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: cd.pantry.tgz | |
cancel-in-progress: true | |
jobs: | |
tarball: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- uses: actions/checkout@v4 | |
with: | |
path: co | |
- run: find co -type f -not -name package.yml -delete -o -type l -delete | |
- run: tar -C co -czf pantry.tgz . | |
- run: aws s3 cp | |
./pantry.tgz | |
s3://${{ secrets.AWS_S3_BUCKET }}/pantry.tgz | |
- run: aws cloudfront create-invalidation | |
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} | |
--paths /pantry.tgz |