Update gh_pages.yml #143
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: | |
branches: [main] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
pages: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Install dependencies | |
run: pip install sphinx sphinx-rtd-theme sphinx-mdinclude sphinxcontrib-katex | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Copy README | |
run: cp ./README.md ./docs/README.md | |
- name: Sphinx apidoc generation | |
working-directory: ./docs | |
run: | | |
sphinx-apidoc --separate --force --no-headings --module-first -o . ../stable_gnn | |
sphinx-build -M html . _build | |
- name: List uploaded artifacts | |
run: ls -R ./docs/_build/html # Диагностика | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact (manual fix) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: ./docs/_build/html # <-- Убедитесь, что этот путь корректен! | |
- name: Debug uploaded artifacts | |
run: | | |
echo "Checking uploaded artifacts..." | |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |