Update Node.js version #561
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
- 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|server-coverage\b|loaders\b)/' | |
env: | |
FORCE_COLOR: 1 | |
STAGING: 1 | |
- name: Upload web assets | |
if: github.ref == 'refs/heads/main' | |
uses: actions/[email protected] | |
with: | |
name: web-client-assets-${{ github.sha }} | |
retention-days: 1 | |
include-hidden-files: true | |
path: | | |
web/dist/ | |
web/routes.regexp | |
staging: | |
name: Web Staging Deploy | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: read | |
id-token: write | |
concurrency: | |
group: staging-web | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/[email protected] | |
- name: Download web assets from test step | |
uses: actions/[email protected] | |
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 |