Files
omnex/.gitea/workflows/ci-web.yml
T
Nuxgrid 6ff6333781
ci-web / test (push) Has been cancelled
ci-web / publish (push) Has been cancelled
ci-api / test (push) Failing after 26m55s
ci-api / publish (push) Failing after 14m58s
chore: dispatch ci
2026-07-27 16:48:41 +02:00

72 lines
1.6 KiB
YAML

name: ci-web
# CI pour web (Vite/React) : install, typecheck, tests, build, puis publication
# de l'image Docker sur push vers main.
on:
push:
branches: [main]
paths:
- "web/**"
- ".gitea/workflows/ci-web.yml"
pull_request:
paths:
- "web/**"
- ".gitea/workflows/ci-web.yml"
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Test
run: npm test
- name: Build
run: npm run build
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push web
uses: docker/build-push-action@v6
with:
context: ./web
file: ./web/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/omnex-web:latest