refactor: Separate client build and nginx deployment #101
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: Client CI/CD | |
on: | |
push: | |
branches: [develop] | |
paths: | |
- 'client/**' | |
- 'core/**' | |
- '.github/workflows/client-ci-cd.yml' | |
jobs: | |
ci-cd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: '9' | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build Core Package | |
working-directory: ./core | |
run: pnpm build | |
- name: Lint Client | |
working-directory: ./client | |
run: pnpm lint | true | |
- name: Test Client | |
working-directory: ./client | |
run: pnpm test | true | |
- name: Build Client | |
working-directory: ./client | |
run: pnpm build | |
- name: Deploy to Server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: mira | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd /home/mira/web30-stop-troublepainter | |
docker cp client/dist/. client-dist:/ | |