Unverified Commit db04a2e4 authored by David Hoeller's avatar David Hoeller Committed by GitHub

Adds doc building step on push (#1234)

# Description

* Adds doc building on push so it can be checked that the docs build
correctly on any branch
* Adds `omni.log` to the sphinx import mock list

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 517c4c14
......@@ -3,45 +3,50 @@ name: Build & deploy docs
on: [push]
jobs:
build-docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install dev requirements
working-directory: ./docs
run: pip install -r requirements.txt
- name: Generate docs
working-directory: ./docs
run: make html
check-secrets:
name: Check secrets
runs-on: ubuntu-latest
outputs:
trigger-build: ${{ steps.trigger-build.outputs.defined }}
trigger-deploy: ${{ steps.trigger-deploy.outputs.defined }}
steps:
- id: trigger-build
- id: trigger-deploy
env:
REPO_NAME: ${{ secrets.REPO_NAME }}
BRANCH_REF: ${{ secrets.BRANCH_REF }}
if: "${{ github.repository == env.REPO_NAME && github.ref == env.BRANCH_REF }}"
run: echo "defined=true" >> "$GITHUB_OUTPUT"
build-docs:
name: Build and deploy documentation
deploy-docs:
name: Deploy Docs
runs-on: ubuntu-latest
needs: [check-secrets]
if: needs.check-secrets.outputs.trigger-build == 'true'
needs: [check-secrets, build-docs]
if: needs.check-secrets.outputs.trigger-deploy == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.10"
architecture: x64
- name: Install dev requirements
working-directory: ./docs
run: pip install -r requirements.txt
- name: Generate docs
working-directory: ./docs
run: make html
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
......@@ -127,6 +127,7 @@ autodoc_mock_imports = [
"warp",
"pxr",
"omni.kit",
"omni.log",
"omni.usd",
"omni.client",
"omni.physx",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment