photos/.forgejo/workflows/deploy.yml
Andras Schmelczer 5b6d144973
All checks were successful
Check & deploy / validate (pull_request) Successful in 9m13s
Check & deploy / deploy (pull_request) Has been skipped
Adopt shared ci-actions for publishing
Replace the inline publish step(s) with the canonical shell-only composite
actions in andras/ci-actions (deploy-pages / docker-publish / forgejo-release).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 14:58:35 +01:00

77 lines
1.7 KiB
YAML

name: Check & deploy
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
runs-on: docker
# Superseded validation runs can be cancelled freely.
concurrency:
group: 'photos-validate-${{ github.ref }}'
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint and static checks
run: npm run lint:check
- name: Unit tests
run: npm test
- name: Build
run: npm run build
- name: Install Playwright browser
run: npx playwright install --with-deps chromium
- name: End-to-end smoke test
run: npm run test:e2e
deploy:
runs-on: docker
needs: validate
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
# Never cancel an in-flight deploy: rsync --delete must finish or the live
# site can be left half-deleted. Newer deploys queue behind this one.
concurrency:
group: 'photos-deploy-${{ github.ref }}'
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Copy build to host pages mount
uses: http://forgejo:3000/andras/ci-actions/deploy-pages@main
with:
source: dist
target: photos