Skip to content

FPGAGrigen get instance based on fnmatch #562

FPGAGrigen get instance based on fnmatch

FPGAGrigen get instance based on fnmatch #562

Workflow file for this run

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@v2
- 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@v2
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',
});