Merge pull request #97 from PermanentOrg/dependabot/npm_and_yarn/babe… #75
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: deploy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- run: npm install | |
- run: npm run build | |
- name: Create a tar archive | |
run: | | |
cd .. | |
tar --exclude=.git* --exclude=node_modules/* --exclude=src/* -czvf upload-service.tar.gz upload-service | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Copy package to S3 | |
run: | | |
aws s3 cp ../upload-service.tar.gz s3://permanent-repos/dev/upload-service.tar.gz | |
aws s3 cp ../upload-service.tar.gz s3://permanent-repos/staging/upload-service.tar.gz | |
aws s3 cp ../upload-service.tar.gz s3://permanent-repos/prod/upload-service.tar.gz |