32 lines
1,011 B
YAML
32 lines
1,011 B
YAML
name: Build and deploy Github pages
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "docs/**"
|
|
- "gen-docs.js"
|
|
- "src/widgets/widget_definitions.rs"
|
|
- ".github/workflows/**"
|
|
jobs:
|
|
build:
|
|
name: shalzz/zola-deploy-action
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout
|
|
- uses: actions/checkout@master
|
|
|
|
# Build widget documentation
|
|
- name: Use deno to build widget documentation
|
|
uses: denoland/setup-deno@main
|
|
with:
|
|
deno-version: "v1.x"
|
|
- run: deno run --allow-read gen-docs.ts ./src/widgets/widget_definitions.rs >> ./docs/content/main/widgets.md
|
|
|
|
# Build & deploy
|
|
- name: shalzz/zola-deploy-action
|
|
uses: shalzz/zola-deploy-action@v0.12.0
|
|
env:
|
|
PAGES_BRANCH: gh-pages
|
|
BUILD_DIR: docs
|
|
TOKEN: ${{ secrets.TOKEN }}
|