Update configuring-execution.rst #109
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: publish | |
on: | |
# Run this workflow only on pushes to the master branch, or if the run workflow button is pressed in the github website. | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-20.04 | |
env: | |
build_api_docs: "ON" | |
python: "3.9" | |
steps: | |
# Chekout this repository into specified path | |
- name: Checkout FLAMEGPU2/FLAMEGPU2-docs | |
uses: actions/checkout@v3 | |
with: | |
path: FLAMEGPU2-docs | |
# If API docs are being built, check them out into a subfolder. | |
- name: Checkout FLAMEGPU2/FLAMEGPU2 | |
if: env.build_api_docs == 'ON' | |
uses: actions/checkout@v3 | |
with: | |
repository: FLAMEGPU/FLAMEGPU2 | |
path: FLAMEGPU2 | |
# Install dependencies via apt | |
- name: Install graphviz | |
run: sudo apt -y install graphviz | |
# Install API docs dependencies via apt | |
- name: Install doxygen | |
if: env.build_api_docs == 'ON' | |
run: sudo apt -y install doxygen | |
- name: Select Python | |
if: ${{ env.python != '' }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.python }} | |
# Install python dependencies via pip into a venv | |
- name: Install python packages | |
working-directory: FLAMEGPU2-docs | |
run: | | |
mkdir -p -m 700 .venv | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install -r requirements.txt | |
# Configure CMake | |
- name: Configure | |
working-directory: FLAMEGPU2-docs | |
run: | | |
source .venv/bin/activate | |
cmake . -B build | |
# Build the documentation | |
- name: Build | |
working-directory: FLAMEGPU2-docs/build | |
run: cmake --build . --target all --verbose -j `nproc` | |
# Deploy the documentation to the gh-pages branch of this repository, which is hosted at docs.flamegpu.com | |
# If cname is ommitted this action empties it, so we provide it here rather than in the settings | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: FLAMEGPU2-docs/build/userguide/ | |
cname: docs.flamegpu.com | |
force_orphan: true |