Skip to content

Merge pull request #7 from cryptnox/feature/improve_SEO_sphinx_docume… #44

Merge pull request #7 from cryptnox/feature/improve_SEO_sphinx_docume…

Merge pull request #7 from cryptnox/feature/improve_SEO_sphinx_docume… #44

Workflow file for this run

name: Deploy Sphinx to GitHub Pages
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build Sphinx
run: sphinx-build -b html docs/source _site
- name: Add CNAME for custom domain
run: echo "docs.cryptnox.com" > _site/CNAME
- uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
# Only deploy on push to main or manual trigger — not on PR builds
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v4