-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: automated release dist to prodction (#3)
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- release* | ||
|
||
workflow_dispatch: | ||
|
||
env: | ||
AWS_REGION: ap-northeast-1 | ||
RABBY_PROD_BUCKET: rabby-fe | ||
CI: true | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Use Node.js v15.14.0 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: v15.14.0 | ||
|
||
- name: Build source code | ||
run: | | ||
npm install -g yarn | ||
yarn install | ||
yarn build | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-region: ${{ env.AWS_REGION }} | ||
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY }} | ||
|
||
- name: Copy dists to s3 | ||
run: | | ||
aws s3 sync . s3://${RABBY_PROD_BUCKET}/ --delete | ||
working-directory: dist |
d6af233
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: