Skip to content

Merge pull request #6370 from FlowFuse/rbac-document #284

Merge pull request #6370 from FlowFuse/rbac-document

Merge pull request #6370 from FlowFuse/rbac-document #284

Workflow file for this run

name: Publish Documentation
on:
push:
branches: [ main, maintenance ]
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
name: Test Documentation links
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '18'
- name: Install Dependencies
run: npm ci
- name: Test Documentation Links
run: npm run test:docs
test-with-website:
runs-on: ubuntu-latest
name: Test Documentation with website
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
path: 'flowfuse'
- name: Check out website repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
repository: 'FlowFuse/website'
path: 'website'
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_APP_KEY }}
- name: Check out FlowFuse/blueprint-library repository (to access the blueprints)
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
repository: 'FlowFuse/blueprint-library'
ref: main
path: 'blueprint-library'
token: ${{ steps.generate_token.outputs.token }}
- name: Cache image pipeline output
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
key: img-pipeline-cache
path: website/_site/img
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: 'npm'
cache-dependency-path: './website/package-lock.json'
- run: npm run docs
working-directory: 'website'
- run: npm run blueprints
working-directory: 'website'
- name: Install Dependencies
run: npm install
working-directory: 'website'
- name: Build the forge
run: npm run build:skip-images
working-directory: 'website'
- uses: untitaker/hyperlink@fb5bb9c5011a3d143a54b4b30aedc30ec5bc0f89 # 0.2.0
with:
args: website/_site/ --check-anchors --sources website/src
publish:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- test
- test-with-website
name: Publish Documentation
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_APP_KEY }}
- name: Trigger website rebuild
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4
with:
workflow: build.yml
repo: flowfuse/website
ref: main
token: ${{ steps.generate_token.outputs.token }}