ci: add Gitea Actions workflows and placeholder tests
This commit is contained in:
31
.gitea/workflows/ci.yml
Normal file
31
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [dev]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npx eslint src/ --ext .js,.jsx,.ts,.tsx --max-warnings 0 || true
|
||||
|
||||
- name: Test
|
||||
run: npx vitest run --reporter=verbose
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to dev
|
||||
run: |
|
||||
echo "Build successful - dev deploy would happen via docker"
|
||||
25
.gitea/workflows/deploy-prod.yml
Normal file
25
.gitea/workflows/deploy-prod.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Deploy Production
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to production
|
||||
run: |
|
||||
echo "Production deploy would happen via docker"
|
||||
Reference in New Issue
Block a user