Skip to content

chore: Backport #3312 to web #966

chore: Backport #3312 to web

chore: Backport #3312 to web #966

Workflow file for this run

name: build-web
on:
pull_request:
paths:
- "web/**"
- ".github/workflows/build-web.yaml"
- "**.md"
workflow_call:
env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTFLAGS: "-C debuginfo=0"
concurrency:
# See notes in `pull-request.yaml`
group: ${{ github.workflow }}-${{ github.ref }}-web
cancel-in-progress: true
jobs:
build-web:
runs-on: ubuntu-latest
# Skip running workflow on forks. Checking the repository owner still allows
# this to be run on PRs, and then below we disable it from attempting to
# publish.
if: github.repository_owner == 'prql'
steps:
- name: 📂 Checkout code
uses: actions/checkout@v3
# Website requires hugo
- name: Setup hugo
uses: peaceiris/[email protected]
- uses: baptiste0928/cargo-install@v2
with:
crate: mdbook
- uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-footnote
- uses: baptiste0928/cargo-install@v2
with:
crate: mdbook-admonish
- uses: baptiste0928/cargo-install@v2
with:
crate: wasm-pack
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: ./.github/set_version.sh
- name: 💰 Cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.version }}
shared-key: web
save-if:
${{ github.ref == 'refs/heads/web' || github.ref ==
'refs/heads/main' }}
- uses: arduino/setup-task@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- name: 🕷️ Build website
run: task build-web
- uses: actions/[email protected]
with:
path: web/website/public/