forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (108 loc) · 4.19 KB
/
Copy pathdocs.yml
File metadata and controls
135 lines (108 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Docs
on: [push, pull_request]
jobs:
Salt:
name: Build Salt Documentation
runs-on: ubuntu-latest
container:
image: python:3.8.6-slim-buster
steps:
- name: Install System Deps
run: |
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
- uses: actions/checkout@v2
- name: Set Python Version Env Var
run: |
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
- name: Install Nox
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:
- docs/**
- name: Set Docs Python Cache Key
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Setup Nox Cache
uses: pat-s/always-upload-cache@v2.1.3
with:
path: .nox/
key: docs-salt|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
- name: Install Python Requirements
env:
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/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@v2
with:
name: salt-html-docs
path: doc/_build/html
Manpages:
name: Build Salt man Pages
runs-on: ubuntu-latest
container:
image: python:3.8.6-slim-buster
steps:
- name: Install System Deps
run: |
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
- uses: actions/checkout@v2
- id: changed-files
name: Get Changed Files
uses: dorny/paths-filter@v2
with:
token: ${{ github.token }}
list-files: json
filters: |
docs:
- docs/**
- name: Set Python Version Env Var
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
run: |
echo PY_VERSION=$(python -c 'import sys; print("{}.{}".format(*sys.version_info))') >> $GITHUB_ENV
- name: Install Nox
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
run: |
python -m pip install --upgrade pip
pip install nox
- name: Set Docs Python Cache Key
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Setup Nox Cache
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
uses: pat-s/always-upload-cache@v2.1.3
with:
path: .nox/
key: docs-man|${{ env.PY }}|${{ hashFiles(format('requirements/static/ci/py{0}/*.txt', env.PY_VERSION)) }}
- name: Install Python Requirements
if: github.event_name == 'push' || steps.changed-files.outputs.docs == 'true'
env:
PIP_EXTRA_INDEX_URL: https://artifactory.saltstack.net/artifactory/api/pypi/pypi-open/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@v2
with:
name: salt-man-pages
path: doc/_build/man