ci: remove things added in rebase #17
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 Building | |
on: | |
push: | |
branches: | |
- main | |
- master | |
workflow_dispatch: {} | |
jobs: | |
docs: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install uv | |
uses: yezz123/setup-uv@v4 | |
- name: Install Dependencies | |
run: | | |
cd Doc | |
uv pip install -r requirements.txt --system | |
- name: Fetch gh-pages | |
run: git fetch origin gh-pages --depth=1 | |
- name: Build docs | |
run: | | |
cd Doc | |
sphinx-build -b html . build/html -a -j auto --keep-going | |
- name: Rename generated index.html | |
run: | | |
mv Doc/build/html/index.html Doc/build/html/indexcontent.html | |
- name: Create .nojekyll and index.html for redirection | |
run: | | |
touch Doc/build/html/.nojekyll | |
echo "<!DOCTYPE HTML> | |
<html lang='en-US'> | |
<head> | |
<title>Page Redirection</title> | |
<meta charset='UTF-8'> | |
<meta http-equiv='refresh' content='0; url=indexcontent.html'> | |
<script type='text/javascript'>window.location.href = 'indexcontent.html'</script> | |
</head> | |
<body> | |
You are being redirected. If this does not work, click <a href='indexcontent.html'>this link</a> | |
</body> | |
</html>" > Doc/build/html/index.html | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: Doc/build/html |