Auto-update from script #248
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: Upload Artifacts | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # allow manually trigger the action | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Validate JSON | |
run: | | |
for file in ./dist/*.json; do | |
echo "Checking $file..." | |
if ! jq empty $file; then | |
echo "Invalid JSON in $file" | |
exit 1 | |
fi | |
done | |
- uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
AWS_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} | |
SOURCE_DIR: "./dist/" |