-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cs3216-a3-group-4/seeleng/set-up-cicd
feat: add ci/cd
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 |