Added block_types #605
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: Documentation | |
on: [push, pull_request] | |
jobs: | |
build_docs: | |
runs-on: ubuntu-latest | |
container: ghcr.io/ganeshgore/sdpphy-docs-image:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup doc enviroment | |
shell: bash | |
run: | | |
source /tmp/buildenv/bin/activate | |
bash ./.github/build_env.sh | |
if [ -f "docs/requirements.txt" ]; then | |
python3 -m pip install --upgrade \ | |
--no-cache-dir -r docs/requirements.txt | |
fi | |
export PYTHONPATH=$PYTHONPATH:${PWD} | |
- name: Build Examples | |
shell: bash | |
run: | | |
source /tmp/buildenv/bin/activate | |
cd docs && PYTHON_EXEC=/tmp/buildenv/bin/python3 make run_examples | |
- name: Build Documentation | |
shell: bash | |
id: build | |
run: | | |
source /tmp/buildenv/bin/activate | |
cd docs && PYTHON_EXEC=/tmp/buildenv/bin/python3 make html | |
sed -i "/.*docs.*build.*/d" .gitignore | |
cat .gitignore | |
- name: Upload regression results | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs_build | |
retention-days: 2 | |
path: | | |
/tmp/sphinx-err* | |
docs/**/* | |
examples/**/* | |
- name: Prepare pre_release documentation | |
if: ${{ ((steps.build.outcome == 'success') && (github.ref == 'refs/heads/pre_release')) }} | |
shell: bash | |
id: prepare_pre_release | |
run: | | |
mv docs/build/html docs/build/html_pre_release | |
find ./docs/build/html_pre_release -name "*.html*" -exec sed -i "s/<head>/<head><base href=\"pre_release\">/" {} \; | |
echo "body{border-top: 20px solid #FF9800;}" > ./docs/build/html_pre_release/_static/custom.css | |
- name: Deploy pre_release documentation | |
if: ${{ ((steps.build.outcome == 'success') && (github.ref == 'refs/heads/pre_release')) }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: docs | |
publish_dir: docs/build/html_pre_release | |
destination_dir: docs/pre_release | |
exclude_assets: "doctrees" | |
- name: Deploy documentation | |
if: ${{ ((steps.build.outcome == 'success') && (github.ref == 'refs/heads/main')) }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: docs | |
publish_dir: docs/build/html | |
destination_dir: docs | |
exclude_assets: "doctrees" | |
# https://github.community/t/triggering-by-other-repository/16163/12 | |
# - name: Workflow Dispatch Notification | |
# # if: ${{ ((steps.build.outcome == 'success') && (github.ref == 'refs/heads/main')) }} | |
# uses: actions/github-script@v6 | |
# with: | |
# github-token: ${{ secrets.PAT_TOKEN }} | |
# script: | | |
# await github.rest.repos.createDispatchEvent({ | |
# owner: 'ganeshgore', | |
# repo: 'spydrnet-physical', | |
# event_type: 'deployment', | |
# }); |