Skip to content

build-docs

build-docs #21

Workflow file for this run

name: build-docs
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/build-docs.yml"
pull_request:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/build-docs.yml"
workflow_dispatch: {}
workflow_run:
workflows: [build-ui]
types: [completed]
env:
VERSION: 0.1.${{ github.run_number }}
jobs:
build-docs:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v4
- name: Set Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "yarn.lock"
- name: Install Dependencies
run: yarn
- name: Download ui
id: download-artifact
uses: dawidd6/action-download-artifact@v9
with:
name: ui
workflow: build-ui.yml
path: docs/content/public/play
- name: Build
run: |
yarn build:docs
- name: version
run: |
echo ${VERSION}>docs/content/.vitepress/dist/version.txt
- uses: actions/upload-artifact@v4
with:
name: docs
path: docs/content/.vitepress/dist