fix: Configure Gitea workflow for monorepo structure

- Add working-directory default to build and deploy jobs
- Fix npm cache lookup to point to dashboard-sqdc/package-lock.json
- Ensure all Node.js and kubectl operations execute from correct directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alexis Bruneteau 2025-10-22 01:29:01 +02:00
parent 1ca02412a9
commit af378e0d0e
2 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,9 @@ jobs:
build: build:
name: Build Docker Image name: Build Docker Image
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults:
run:
working-directory: dashboard-sqdc
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -21,6 +24,7 @@ jobs:
with: with:
node-version: '18' node-version: '18'
cache: 'npm' cache: 'npm'
cache-dependency-path: dashboard-sqdc/package-lock.json
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@ -50,6 +54,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
if: github.event_name == 'push' if: github.event_name == 'push'
defaults:
run:
working-directory: dashboard-sqdc
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -207,7 +207,7 @@ The workflow file is already created at `.gitea/workflows/build-deploy.yml`
**Workflow steps:** **Workflow steps:**
1. Build - Runs tests, builds Docker image, and pushes to container registry 1. Build - Runs tests, builds Docker image, and pushes to container registry
2. Deploy - Pulls image from registry and deploys to Kubernetes (only on main/dashboard branch) 2. Deploy - Pulls image from registry and deploys to Kubernetes (on any push)
3. Notify - Sends deployment status 3. Notify - Sends deployment status
### 4. First Deployment ### 4. First Deployment