-
Notifications
You must be signed in to change notification settings - Fork 170
66 lines (57 loc) · 2.09 KB
/
doc-deployment.yml
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
name: Build and Deploy Documents
on: [push, pull_request]
env:
LANG: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
PIP_DISABLE_PIP_VERSION_CHECK: "ON"
PIP_NO_CLEAN: "ON"
PIP_PREFER_BINARY: "ON"
TZ: "UTC"
FORD_FILE: "API-doc-FORD-file.md"
jobs:
Build-API-Docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install -v ford==7.0.5
pip install fypp
python --version
ford --version
fypp --version
- name: Skip graph and search unless deploying
if: github.ref != 'refs/heads/master' && ! startsWith( github.ref, 'refs/tags/' )
run: |
sed -i 's/^[[:blank:]]*graph: *[Tt]rue/graph: false/' "${FORD_FILE}"
echo "MAYBE_SKIP_SEARCH=--no-search" >> $GITHUB_ENV
- name: Build Docs
run: |
git fetch --all --tags
ford -r $(git describe --always) --debug ${MAYBE_SKIP_SEARCH} "${FORD_FILE}"
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: FORD-API-docs
path: ./API-doc/
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@v1
with:
TARGET: file://${{ github.workspace }}/API-doc/index.html
RECURSIVE: true
ASSIGNEES: ${{ github.actor }}
- name: Deploy API Docs
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.repository == 'fortran-lang/stdlib' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' )
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
cname: 'stdlib.fortran-lang.org'
external_repository: fortran-lang/stdlib-docs
publish_dir: ./API-doc
publish_branch: master
allow_empty_commit: true
force_orphan: false
commit_message: "From https://github.com/${{ github.repository }}/commit/${{ github.sha }} ${{ github.ref }}"