Skip to content

Add documentation generation #17

Add documentation generation

Add documentation generation #17

Workflow file for this run

---
name: 'Deploy Docs'
on:
workflow_dispatch:
push:
tags:
- 'latest'
branches:
- 'main'
pull_request:
branches:
- 'main'
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: false
jobs:
build_docs:
name: 'Build Docs'
runs-on: intellabs-01
container:
image: ghcr.io/sphinx-doc/sphinx:7.1.2
volumes:
- ${{ github.workspace }}/docs:/docs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
shell: bash
run: |
apt update
apt install -y -qq --no-install-recommends enchant-2 git
pip install -r docs/requirements.txt
sphinx-build -b linkcheck ./docs _build
sphinx-build -b spelling ./docs _build
sphinx-build -M html ./docs _build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: '_build/html'
# # https://1cicd.intel.com/standards.html#standard-stage-names
# deploy_publish_github_pages:
# name: 'Deploy to GitHub Pages'
# needs: build_docs
# if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
# runs-on: intellabs-01
# container:
# image: 'amr-registry.caas.intel.com/heaven/sphinx-html-builder:latest'
# credentials:
# username: ${{ secrets.BUILD_USER }}
# password: ${{ secrets.ARTIFACTORY_BUILD_AMSRL }}
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# permissions:
# pages: write
# id-token: write
# steps:
# - name: Setup Pages
# uses: actions/configure-pages@v3
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2