Skip to content

e

e #112

Workflow file for this run

# The site is built on branch `dist`, in folder `docs`,
# which makes the build compatible with Github Pages and Netlify
name: Build website
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
branches:
- main
- "staging**"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: "build-website"
cancel-in-progress: true
jobs:
build-website:
# Note: `github.event.base_ref` is equal to `refs/heads/main` only when the workflow is triggered
# by a lightweight tag (_not_ an annotated tag) placed on the last commit of the `main` branch
# if: github.event.base_ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/staging')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo ${{ startsWith(github.ref, 'refs/tags/' }}

Check failure on line 31 in .github/workflows/build-website.yml

View workflow run for this annotation

GitHub Actions / Build website

Invalid workflow file

The workflow is not valid. .github/workflows/build-website.yml (Line: 31, Col: 14): Unexpected end of expression: ''refs/tags/''. Located at position 24 within expression: startsWith(github.ref, 'refs/tags/'
- run: echo "BRANCH=$([[ "$(git rev-parse HEAD)" == "$(git rev-parse origin/main)" ]] && echo "dist" || echo "staging/dist")" >> $GITHUB_ENV
id: BRANCH
- run: echo ${{ env.BRANCH }}