Skip to content

Commit

Permalink
build(gha): update s3 step
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Feb 24, 2023
1 parent 9b04c45 commit b8d2de1
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,28 @@ jobs:
needs: upload
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: github-pages

- uses: reggionick/s3-deploy@v3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: 'Untar artifact'
shell: bash
run: |
mkdir artifact
tar -xf artifact.tar -C artifact
- uses: myparcelnl/actions/aws-setup@v3
with:
region: ${{ secrets.AWS_DEFAULT_REGION }}
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- uses: myparcelnl/actions/aws-s3-sync@v3
with:
bucket-region: ${{ secrets.AWS_DEFAULT_REGION }}
source: artifact
bucket: ${{ secrets.S3_BUCKET }}
delete-removed: true
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
folder: artifact
private: true
distribution-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
delete: true

deploy-ghp:
needs: upload
Expand Down

0 comments on commit b8d2de1

Please sign in to comment.