Merge pull request #100 from S0L-V/feat/add-admin-make-id #49
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: Frontend Deploy (Desktop) | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Set environment variables | |
| run: | | |
| { | |
| echo "VITE_API_BASE_URL=https://wefin.shinhanacademy.co.kr/api" | |
| echo "VITE_WS_URL=https://wefin.shinhanacademy.co.kr/ws" | |
| echo "VITE_TOSS_CLIENT_KEY=${{ secrets.DEV_TOSS_CLIENT_KEY }}" | |
| } > .env.production | |
| - name: Build | |
| run: pnpm build | |
| - name: Deploy to nginx | |
| run: | | |
| TARGET_DIR="/home/student/wefin/frontend" | |
| mkdir -p "$TARGET_DIR" | |
| rm -rf "$TARGET_DIR"/* | |
| cp -r dist/* "$TARGET_DIR"/ | |
| - name: Restart nginx | |
| run: | | |
| docker compose -f /home/student/wefin/docker-compose-desktop.yml restart nginx || true |