Don't use /latest, update link to docs (#54) #54
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: "[CI/CD] Deploy Static Site to S3" | |
on: | |
# pull_request: | TODO: add testing/validation | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Sync to S3 static site | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Configure AWS credentials | |
uses: aws-actions/[email protected] | |
with: | |
aws-region: ${{secrets.AWS_REGION}} | |
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }} | |
- name: Sync to S3 | |
run: | # Sync index and security txt, exclude hidden files; Sync assets and remove any that aren't in source | |
aws s3 sync . s3://pyscript.net/ --exclude ".*" --include ".well-known/security.txt" --include "index.html" --include "error.html" | |
aws s3 sync --delete assets/ s3://pyscript.net/assets/ |