Documentation #114
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: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
Build-Documentation: | |
runs-on: [self-hosted, A100] | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.CI_PAT }} | |
fetch-depth: 0 | |
- name: Clear docs | |
run: | | |
rm -r /tmp/triton-docs | |
continue-on-error: true | |
- name: Install dependent packages | |
run: | | |
pip3 install tabulate | |
pip3 install cmake | |
pip3 install sphinx | |
pip3 install myst_parser | |
#- name: Fetch dependent branches | |
# run: | | |
# git fetch origin main:main | |
- name: Build docs | |
run: | | |
cd docs | |
export PATH=$(python3 -c "import cmake; print(cmake.CMAKE_BIN_DIR)"):$PATH | |
python3 -m sphinx . _build/html/main | |
- name: Update docs | |
run: | | |
mkdir /tmp/triton-docs | |
mv docs/_build/html/* /tmp/triton-docs/ | |
git checkout gh-pages | |
cp -r CNAME /tmp/triton-docs/ | |
cp -r index.html /tmp/triton-docs/ | |
cp -r .nojekyll /tmp/triton-docs/ | |
rm -r * | |
cp -r /tmp/triton-docs/* . | |
git add . | |
git commit -am "[GH-PAGES] Updated website" | |
- name: Publish docs | |
run: | | |
git push origin gh-pages |