Skip to content

Commit

Permalink
Merge pull request #2 from cs3216-a3-group-4/seeleng/set-up-cicd
Browse files Browse the repository at this point in the history
feat: add ci/cd
  • Loading branch information
seelengxd authored Sep 19, 2024
2 parents 17c430b + bfb13be commit 0fab87b
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: ./deploy-cs3216a3.sh
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0fab87b

Please sign in to comment.