Skip to content

Commit

Permalink
upload assets to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoishin committed Jan 7, 2024
1 parent a9da94d commit 8b48e49
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
- main

permissions:
contents: read
packages: write
id-token: write

jobs:
test:
Expand All @@ -26,15 +28,16 @@ jobs:
- run: npm run test

- if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: actions/upload-artifact@v4
uses: aws-actions/configure-aws-credentials@v4
with:
name: admin
path: ./projects/admin/dist
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ap-northeast-1
- if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: actions/upload-artifact@v4
with:
name: client
path: ./projects/client/dist
run: |
zip -r /tmp/admin.zip ./projects/admin/dist
aws s3 cp /tmp/admin.zip s3://${{ secrets.AWS_S3_BUCKET }}/${{ github.sha }}/admin.zip
zip -r /tmp/client.zip ./projects/client/dist
aws s3 cp /tmp/client.zip s3://${{ secrets.AWS_S3_BUCKET }}/${{ github.sha }}/client.zip
docker-image:
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
Expand Down

0 comments on commit 8b48e49

Please sign in to comment.