salt/.github/workflows/docs.yml
Pedro Algarvio 622206709e Update GH Actions versions to stop getting warnings
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2022-12-01 20:34:34 +00:00

125 lines
3.8 KiB
YAML

name: Docs
on: [push, pull_request]
permissions:
contents: read
jobs:
Salt:
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
name: Build Salt Documentation
runs-on: ubuntu-latest
container:
image: python:3.8.6-slim-buster
steps:
- name: Install System Deps
run: |
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install -y enchant git gcc imagemagick make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev xz-utils
apt-get install -y git/buster-backports
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Nox
env:
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
run: |
python -m pip install --upgrade pip
pip install nox
- id: changed-files
name: Get Changed Files
uses: dorny/paths-filter@v2
with:
token: ${{ github.token }}
list-files: json
filters: |
docs:
- doc/**
- name: Install Python Requirements
env:
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
run:
nox --install-only --forcecolor -e 'docs-html(compress=False, clean=True)'
- name: Build Docs
env:
SKIP_REQUIREMENTS_INSTALL: YES
run: |
nox --forcecolor -e 'docs-html(compress=False, clean=True)'
- name: Store Generated Documentation
uses: actions/upload-artifact@v3
with:
name: salt-html-docs
path: doc/_build/html
Manpages:
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
name: Build Salt man Pages
runs-on: ubuntu-latest
container:
image: python:3.8.6-slim-buster
steps:
- name: Install System Deps
run: |
echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install -y enchant git gcc imagemagick make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
apt-get install -y git/buster-backports
- uses: actions/checkout@v3
- id: changed-files
name: Get Changed Files
uses: dorny/paths-filter@v2
with:
token: ${{ github.token }}
list-files: json
filters: |
docs:
- doc/**
- name: Install Nox
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
env:
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
run: |
python -m pip install --upgrade pip
pip install nox
- name: Install Python Requirements
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
env:
PIP_EXTRA_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
run:
nox --install-only --forcecolor -e 'docs-man(compress=False, update=False, clean=True)'
- name: Build Manpages
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
env:
SKIP_REQUIREMENTS_INSTALL: YES
run: |
nox --forcecolor -e 'docs-man(compress=False, update=False, clean=True)'
- name: Store Generated Documentation
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
uses: actions/upload-artifact@v3
with:
name: salt-man-pages
path: doc/_build/man