Merge pull request #36 from Billing-Wise/dev #7
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: CD | |
on: | |
push: | |
branches: | |
- prod | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: create env file | |
run: | | |
touch .env | |
echo "${{ secrets.ENV }}" >> .env | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Run a multi-line script | |
run: | | |
npm install | |
npm run build | |
- name: S3 Sync | |
uses: jakejarvis/[email protected] | |
with: | |
args: --acl public-read --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'ap-northeast-2' | |
SOURCE_DIR: 'dist' | |
- name: Invalidate Cloudfront | |
uses: chetan/[email protected] | |
env: | |
DISTRIBUTION: ${{ secrets.DISTRIBUTION }} | |
PATHS: '/*' | |
AWS_REGION: 'ap-northeast-2' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |