This repository has been archived by the owner on May 8, 2024. It is now read-only.
chore: update client #127
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 | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: latest | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
- run: pnpm install | |
- run: pnpm --version | |
- run: pnpm build | |
remote-ssh-command: | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main') | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using ssh key | |
uses: appleboy/ssh-action@master | |
env: | |
PATH: ${{ secrets.ENV_PATH }} | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
envs: PATH | |
script: | | |
cd ~/frontend | |
git fetch --all && git reset --hard origin/main | |
pnpm install --frozen-lockfile |