Update docs (deprecate Wiki) (#364) #289
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Documentation and Website | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-22.04 | |
steps: | |
# | |
# Checks-out repository under $GITHUB_WORKSPACE | |
# | |
- uses: actions/checkout@v4 | |
# | |
# Synchronize the package index | |
# | |
- name: Synchronize the package index | |
run: sudo apt-get update | |
# | |
# Install dependencies | |
# | |
- name: Install dependencies | |
run: | | |
sudo apt-get install graphviz | |
sudo pip install 'markdown<3.4' ford | |
# | |
# Install Ruby | |
# | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
# | |
# Install Jekyll | |
# | |
- name: Install Jekyll | |
run: | | |
cd doc/jekyll_site | |
sudo gem install bundler jekyll | |
bundle update | |
# | |
# Build documentation | |
# | |
- name: Build Documentation | |
run: | | |
cd doc | |
./build_documentation.sh -ci | |
# | |
# Upload documentation | |
# | |
- name: Upload Documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation | |
path: public/ | |
if-no-files-found: error | |
# | |
# Check broken links | |
# | |
- name: Broken Link Check | |
if: ${{ github.ref == 'refs/heads/main'}} | |
uses: technote-space/broken-link-checker-action@v2 | |
with: | |
TARGET: file://${{ github.workspace }}/doc/ford_site/pages/index.html | |
RECURSIVE: true | |
ASSIGNEES: ${{ github.actor }} | |
# | |
# Deploy | |
# | |
- name: Deploy to Github Pages root | |
uses: JamesIves/github-pages-deploy-action@v4.7.3 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
with: | |
branch: gh-pages | |
folder: public/ | |
# | |
# Deploy documentation (can add target-folder) | |
# Won't run on pull requests or push unless a new branch is added to the on: section | |
# | |
- name: Deploy to Github Pages folder | |
uses: JamesIves/github-pages-deploy-action@v4.7.3 | |
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }} | |
with: | |
branch: gh-pages | |
folder: public/ | |
target-folder: staging/ |