Repository navigation
68 lines (64 loc) · 2.21 KB
/
Copy pathdocs-check.yml
File metadata and controls
68 lines (64 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Documentation Checks
on:
push:
branches: ['docs_site', 'docs/user-guides', 'docs/naca0021']
pull_request:
branches: ['docs_site', 'develop', 'docs/user-guides']
workflow_dispatch:
inputs:
su2_ref:
description: SU2 commit SHA or branch
default: docs/developer-guides
permissions:
contents: read
concurrency:
group: docs-check-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-24.04
steps:
- name: Checkout website under review
uses: actions/checkout@v4
with:
path: site
fetch-depth: 0
filter: blob:none
persist-credentials: false
- name: Checkout SU2 documentation tools
uses: actions/checkout@v4
with:
repository: rois1995/SU2
ref: ${{ inputs.su2_ref || 'docs/developer-guides' }}
path: su2
fetch-depth: 0
filter: blob:none
persist-credentials: false
- name: Get release tags for migration reference
run: git -C su2 fetch --quiet --filter=blob:none https://github.com/su2code/SU2.git 'refs/tags/v7.*:refs/tags/v7.*' 'refs/tags/v8.*:refs/tags/v8.*'
- name: Setup Node for search checks
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Check search behavior
run: node site/tools/test_search.js
- name: Setup Ruby and locked gems
uses: ruby/setup-ruby@v1
with:
working-directory: site
ruby-version: .ruby-version
bundler: '2.4.22'
bundler-cache: true
- name: Install code reference tools
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz
- name: Build and check website
env:
GITHUB_REPOSITORY: rois1995/SU2
BUNDLE_PATH: ${{ github.workspace }}/site/vendor/bundle
run: python3 su2/Docs/website/tools/build_docs.py --su2 su2 --site site --build-dir "$RUNNER_TEMP/docs-site" --baseurl /SU2 --mark-changes
- name: Upload checked preview
uses: actions/upload-artifact@v4
with:
name: docs-preview
path: ${{ runner.temp }}/docs-site/site
retention-days: 7