ArkiLovesProgramming is deploying static website file to s3 #48
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: deploy-to-s3 | |
| run-name: ${{ github.actor }} is deploying static website file to s3 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: running npm ci | |
| run: npm ci | |
| - name: building npm | |
| run: npm run build | |
| - name: sync to S3 | |
| uses: jakejarvis/s3-sync-action@master | |
| with: | |
| args: --follow-symlinks --delete | |
| env: | |
| AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: 'ca-central-1' # optional: defaults to us-east-1 | |
| SOURCE_DIR: 'dist' # optional: defaults to entire repository |