front deploy for dev #238
This file contains hidden or 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 dev | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@v3 | |
| - name: Use node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| - name: Cache Yarn cache | |
| id: cache-yarn | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.yarn/cache | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Clean Dependencies | |
| if: steps.cache-yarn.outputs.cache-hit != 'true' | |
| run: | | |
| cd frontend | |
| yarn cache clean | |
| rm -rf node_modules | |
| - name: Install Dependencies | |
| if: steps.cache-yarn.outputs.cache-hit != 'true' | |
| run: | | |
| cd frontend | |
| yarn install --frozen-lockfile --check-files | |
| - name: Build | |
| run: | | |
| cd frontend | |
| yarn build:dev | |
| 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-dev-deploy |