Skip to content

build-web

build-web #1

Workflow file for this run

name: build-web
on:
workflow_call:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTFLAGS: "-C debuginfo=0"
RUSTDOCFLAGS: "-Dwarnings"
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@v4
# Website requires hugo
- name: Setup hugo
uses: peaceiris/actions-hugo@v2.6.0
- 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"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- 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 web
run: task build-web
- uses: actions/upload-pages-artifact@v2.0.0
with:
path: web/website/public/