Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Test docs along with website #4840

Merged
merged 6 commits into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,60 @@ jobs:
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@v4
with:
path: 'flowfuse'
- name: Check out website repository
uses: actions/checkout@v4
with:
repository: 'FlowFuse/website'
path: 'website'
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v2
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@v4
with:
repository: 'FlowFuse/blueprint-library'
ref: main
path: 'blueprint-library'
token: ${{ steps.generate_token.outputs.token }}
- name: Cache image pipeline output
uses: actions/cache@v4
with:
key: img-pipeline-cache
path: website/_site/img
- uses: actions/setup-node@v4
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@0.1.43
with:
args: website/_site/ --check-anchors --sources website/src
publish:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
needs:
- test
- test-with-website
name: Publish Documentation
steps:
- name: Generate token
Expand Down