Deploy to AWS S3 #3
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 AWS S3 | |
| on: | |
| workflow_run: | |
| workflows: ["Deploy to gh-pages branch"] | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.S3_UPLOAD_AWS_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.S3_UPLOAD_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-2 | |
| - name: Deploy to S3 | |
| run: | | |
| aws s3 sync . s3://ccported --delete |