add links to gitee issue tracker #54
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
# This workflow will build the docs and publish them to GitHub Pages/Read the Docs. | |
name: Build Docs with Sphinx and Publish | |
on: | |
push: | |
branches: [ doc, dev ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
# Enable bib-lookup | |
DB_BIB_LOOKUP: true | |
PANDOC_RELEASE: 3.1.7 | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
# Don't run on forked repos. | |
if: github.repository_owner == 'DeepPSP' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Clear unnecessary system components | |
run: | | |
echo "Free space before cleanup:" | |
df -h | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "Free space after cleanup:" | |
df -h | |
- name: Install system libraries | |
run: | | |
sudo apt update | |
sudo apt install build-essential ffmpeg libsm6 libxext6 libsndfile1 wget -y | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel ipython | |
python -m pip install -r requirements.txt | |
python -m pip install -r docs/requirements.txt | |
python -m pip uninstall diff-binom-confint --yes # Remove if already installed | |
python setup.py install_egg_info | |
pip install -e .[dev] | |
pip install jupyter 'ipykernel<5.0.0' 'ipython<7.0.0' | |
- name: Setup TeX Live | |
# This is used to render the tikz plots, algorithm2e, etc. | |
uses: teatimeguest/setup-texlive-action@v2 | |
with: | |
# List of TeXLive-packages contained in the scheme-basic | |
# https://trac.macports.org/wiki/TeXLivePackages | |
# tlmgr info --list scheme-basic | |
# tlmgr info --list collection-latex | |
# tlmgr info --list collection-basic | |
packages: >- | |
scheme-basic | |
algorithm2e | |
biber | |
biblatex | |
pgf | |
pgfplots | |
relsize | |
standalone | |
xetex | |
xecjk | |
ifoddpage | |
- name: Install latexmk and pandoc and extra software | |
run: | | |
sudo apt install latexmk -y | |
wget https://github.com/jgm/pandoc/releases/download/$PANDOC_RELEASE/pandoc-$PANDOC_RELEASE-1-amd64.deb | |
sudo dpkg -i pandoc-$PANDOC_RELEASE-1-amd64.deb | |
sudo rm pandoc-$PANDOC_RELEASE-1-amd64.deb | |
sudo apt install texlive-pictures texlive-latex-extra pdf2svg -y | |
- name: Build docs with Sphinx and check for errors | |
run: | | |
cd docs | |
make html | |
make linkcheck | |
# Publish to GitHub Pages | |
- name: Publish to GitHub Pages | |
# publish only when pushed to the 'doc' branch or manually triggered | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/doc') || (github.event_name == 'workflow_dispatch') | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html | |
publish_branch: gh-pages | |
user_name: 'WEN Hao' | |
user_email: 'wenh06@gmail.com' |