Skip to content

Commit

Permalink
ci: automated release dist to prodction (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryz authored Dec 7, 2021
1 parent 085bada commit d6af233
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
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

1 comment on commit d6af233

@vercel
Copy link

@vercel vercel bot commented on d6af233 Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.