Skip to content

Commit

Permalink
Merge pull request #10 from toadslop/static-site-infra
Browse files Browse the repository at this point in the history
try new deploy action
  • Loading branch information
toadslop authored May 25, 2024
2 parents f32e0de + a07972f commit 4f2c03a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/publish_static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ jobs:
- name: Build
working-directory: ./static-site
run: zola build
- uses: reggionick/s3-deploy@v4
env:
AWS_ACCESS_KEY_ID: ${{ vars.STATIC_DEPLOYER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STATIC_DEPLOYER_SECRET_ACCESS_KEY }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
folder: static-site/public
bucket: ${{ vars.S3_BUCKET }}
private: true
bucket-region: us-east-1
# Use the next two only if you have created a CloudFront distribution
dist-id: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /*
aws-access-key-id: ${{ vars.STATIC_DEPLOYER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.STATIC_DEPLOY_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-1

- name: Deploy static site to S3 bucket
run: aws s3 sync . s3://${{ vars.S3_BUCKET }} --delete

0 comments on commit 4f2c03a

Please sign in to comment.