Skip to content

Commit 263b064

Browse files
🔧(tooling) add workflow to push to main-(ocr|ingestion|web) (#659)
* 🔧(tooling) add workflow to push to main-(ocr|ingestion|web) * 🔧(tooling) guard branch name
1 parent 939de77 commit 263b064

4 files changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Deploy to Scalingo
2+
description: Force-push the repository to a deploy branch for Scalingo to deploy. Requires actions/checkout to have run first.
3+
4+
inputs:
5+
branch:
6+
description: Target branch to force-push to (e.g. main-ocr)
7+
required: true
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Push to deploy branch
13+
shell: bash
14+
run: git push origin HEAD:refs/heads/${{ inputs.branch }} --force

.github/workflows/ingestion.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,16 @@ jobs:
105105
service-path: src/ingestion
106106
- name: Test with pytest
107107
run: uv run pytest --cov=. --cov-report=term-missing --cov-fail-under=95
108+
109+
deploy-ingestion:
110+
needs: [check-changes, lint-ingestion, test-ingestion]
111+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check-changes.outputs.relevant == 'true'
112+
runs-on: ubuntu-latest
113+
environment: production
114+
permissions:
115+
contents: write
116+
steps:
117+
- uses: actions/checkout@v6
118+
- uses: ./.github/actions/scalingo-deploy
119+
with:
120+
branch: main-ingestion

.github/workflows/ocr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,16 @@ jobs:
7979
sudo apt-get install -y poppler-utils tesseract-ocr tesseract-ocr-fra
8080
- name: Test with pytest
8181
run: uv run pytest .
82+
83+
deploy-ocr:
84+
needs: [check-changes, lint-ocr, test-ocr]
85+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check-changes.outputs.relevant == 'true'
86+
runs-on: ubuntu-latest
87+
environment: production
88+
permissions:
89+
contents: write
90+
steps:
91+
- uses: actions/checkout@v6
92+
- uses: ./.github/actions/scalingo-deploy
93+
with:
94+
branch: main-ocr

.github/workflows/web.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,16 @@ jobs:
150150
run: uv run playwright install --with-deps chromium
151151
- name: Test Web suite with coverage
152152
run: uv run pytest -m "e2e" .
153+
154+
deploy-web:
155+
needs: [check-changes, lint-web, test-web]
156+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check-changes.outputs.relevant == 'true'
157+
runs-on: ubuntu-latest
158+
environment: production
159+
permissions:
160+
contents: write
161+
steps:
162+
- uses: actions/checkout@v6
163+
- uses: ./.github/actions/scalingo-deploy
164+
with:
165+
branch: main-web

0 commit comments

Comments
 (0)