Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

ci: setup ci

ci: setup ci #1

Workflow file for this run

---
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 gen:api
- 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
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd ~/frontend
git fetch --all && git reset --hard origin/main