diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..1a2dacea --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,17 @@ +name: deploy +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: ./deploy-cs3216a3.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..d6828567 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,40 @@ +name: CI +on: push +jobs: + frontend: + name: frontend (eslint) + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: "20" + - name: install + run: npm install + - name: ESLint + run: npm run lint + backend: + name: format, lint + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./backend + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + enable-cache: true + cache-dependency-glob: "uv.lock" + version: "0.4.10" + - name: Set up Python + run: uv python install + - name: Install dependencies + run: uv sync --all-extras --dev + - name: Check code formatting + run: uvx ruff format --check + - name: Lint + run: uvx ruff check