Skip to content

Add candidate to preview URL #184

Add candidate to preview URL

Add candidate to preview URL #184

Workflow file for this run

name: Main
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '.vscode/**'
- '.husky/**'
- '.devcontainer/**'
pull_request:
paths-ignore:
- '**/*.md'
- '.vscode/**'
- '.husky/**'
- '.devcontainer/**'
jobs:
test:
name: Test
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Initialize Node.js
uses: ./.github/actions/init-node
- name: Run tests
run: pnpm run -r --include-workspace-root '/^test:(?!markdown\b|proxy-coverage\b|loaders\b)/'
env:
FORCE_COLOR: 1
STAGING: 1
- name: Upload web assets
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: web-client-assets-${{ github.sha }}
path: |
web/dist/
web/routes.regexp
retention-days: 1
staging:
name: Web Staging Deploy
needs: test
if: github.ref == 'refs/heads/main'
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download web assets from test step
uses: actions/download-artifact@v4
with:
name: web-client-assets-${{ github.sha }}
path: web/
- name: Deploy to Google Cloud
uses: ./.github/actions/deploy
with:
projectId: slowreader-421120
region: europe-west1
folder: ./web/
registry: staging/web
service: staging-web