-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add router, basic nav * Deploy to S3 with github action * Clear cache
- Loading branch information
1 parent
929cfe2
commit 3c831f4
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
cloudfront_distribution: ${{ secrets.CLOUDFRONT_DISTRIBUTION }} | ||
jobs: | ||
deploy-to-s3: | ||
name: Deploy to S3 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Build | ||
working-directory: vacs-map-app | ||
run: | | ||
npm install && npm run build-staging | ||
- name: Configure AWS | ||
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-2 | ||
- name: Copy to S3 | ||
working-directory: vacs-map-app | ||
run: | | ||
aws s3 sync dist s3://stories2.theplotline.org/vacs/ --delete | ||
- name: Clear Cloudfront cache | ||
run: | | ||
aws cloudfront create-invalidation $cloudfront_distribution --paths '/vacs/*' |
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