This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
[FE] refactor: 도움말 디자인 바꾸기 (#563) #9
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: CICD for Frontend Production | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'frontend/**' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
cache-dependency-path: ${{ vars.FE_DIRECTORY }}/yarn.lock | |
- name: Install dependencies | |
run: | | |
yarn install --frozen-lockfile | |
working-directory: ${{ vars.FE_DIRECTORY }} | |
- name: Create .env.production variable | |
run: | | |
touch .env.production | |
echo "BASE_URL=${{vars.API_SERVER_URL_PRODUCTION}}" >> .env.production | |
echo "DOMAIN_URL=${{vars.WEB_URL_PRODUCTION}}" >> .env.production | |
working-directory: ${{ vars.FE_DIRECTORY }} | |
- name: Build | |
run: | | |
yarn build:prod | |
working-directory: ${{ vars.FE_DIRECTORY }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: ${{ vars.FE_DIRECTORY }} | |
file: ${{ vars.FE_DIRECTORY }}/Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/dong-gle-frontend-prod:latest | |
platforms: linux/arm64 | |
deploy: | |
needs: build | |
uses: ./.github/workflows/deploy-prod.yml | |
secrets: inherit |