Update docs.yml #94
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: docs | |
on: | |
push: | |
# branches: | |
# - 'main' | |
workflow_dispatch: | |
jobs: | |
update-docs: | |
if: github.repository == 'symforce-org/symforce' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Should include history since the last tag for setuptools_scm to work | |
fetch-depth: 300 | |
fetch-tags: true | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
doxygen \ | |
libgmp-dev \ | |
pandoc | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- name: Install python dependencies | |
run: pip install -r dev_requirements.txt | |
- name: Run cmake build | |
run: | | |
cmake -B build \ | |
-DSYMFORCE_BUILD_OPT=ON \ | |
-DSYMFORCE_BUILD_CC_SYM=ON \ | |
-DSYMFORCE_BUILD_EXAMPLES=OFF \ | |
-DSYMFORCE_BUILD_TESTS=OFF \ | |
-DSYMFORCE_BUILD_SYMENGINE=ON \ | |
-DSYMFORCE_GENERATE_MANIFEST=ON \ | |
-DSYMFORCE_BUILD_BENCHMARKS=OFF | |
cmake --build build -j $(nproc) | |
- name: Build docs | |
run: | | |
pip install build/lcmtypes/python2.7 | |
make docs | |
- name: Remove unnecessary doc files | |
run: | | |
rm -rf build/docs/.doctrees | |
rm build/docs/.buildinfo | |
- name: Deploy docs | |
# Don't deploy on workflow_dispatch runs | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: symforce-org/github-action-push-to-another-repository@10a3e9ec247be83fedd82f7bb7c3ed1f7218528e | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DOCUMENTATION_DEPLOY_KEY }} | |
with: | |
source-directory: build/docs | |
destination-github-username: 'symforce-org' | |
destination-repository-name: 'symforce-org.github.io' | |
user-email: [email protected] | |
commit-message: Regenerate docs from ${{ github.sha }} | |
target-branch: main | |
destination-patterns-to-preserve: 'CNAME .nojekyll downloads' |