front deploy for prod #84
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: front deploy for prod | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source Code | |
uses: actions/checkout@v2 | |
- name: Use node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache node_modules | |
id: cache | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node-modules- | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
cd frontend | |
yarn install --frozen-lockfile | |
- name: Build | |
run: | | |
cd frontend | |
yarn build:prd | |
env: | |
CI: false | |
- name: Deploy to S3 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
aws s3 cp --recursive --region ap-northeast-2 frontend/build s3://prolog-deploy |