Skip to content

Commit

Permalink
Publish sphinx to GH Pages from GHA (#6384)
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Jul 23, 2024
1 parent 7916601 commit 7fc0b1b
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 126 deletions.
126 changes: 0 additions & 126 deletions .azure-pipelines-gh-pages.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ Publishes ccf Python package from a GitHub release to PyPI. Triggered on release
File: `pypi.yml`
3rd party dependencies: None

# Documentation

Builds and publishes documentation to GitHub Pages. Triggered on pushes to main, and manually. Note that special permissions (Settings > Environment) are configured.

File: `doc.yml`
3rd party dependencies: None

# Deprecated

The following pipelines are still here to support 4.x, but will be removed when it reaches EOL.
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "Doc"

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest
container:
image: ghcr.io/microsoft/ccf/ci/default:latest
steps:
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build Documentation
run: |
set -x
python3.8 -m venv env
source env/bin/activate
pip install -U pip
pip install -U -e ./python
pip install -U -r doc/requirements.txt
pip install -U -r doc/historical_ccf_requirements.txt
sphinx-multiversion -D smv_remote_whitelist=origin doc build/html
shell: bash
- name: Set up top-level directory
run: |
set -x
cd build/html
touch .nojekyll
cp ../../doc/index.html .
shell: bash
- name: Upload pages
uses: actions/upload-pages-artifact@v3
with:
path: build/html

# This is purposefully separate to keep the scope with
# with the permissions to deploy to a minimum.
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 7fc0b1b

Please sign in to comment.