-
Notifications
You must be signed in to change notification settings - Fork 45
53 lines (51 loc) · 1.68 KB
/
build-docs.yaml
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
name: "Build docs"
on:
workflow_call:
inputs:
ref:
description: "the git revision to checkout"
default: ${{ github.ref }}
required: false
type: string
secrets:
ARTIFACTS_USER:
required: true
ARTIFACTS_PASSWORD:
required: true
jobs:
docs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Install Python 3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install deps
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install --no-install-recommends -y plantuml
python3.10 -m pip install tox~=4.0.19
- name: Build documentation for ReadTheDocs
env:
# Fake that we are building in a ReadTheDocs environment
READTHEDOCS: "True"
run: tox --workdir /tmp/tox -e docs -- html
- name: Copy generated docs for ReadTheDocs
run: mkdir -p artifacts/docs/readthedocs && cp -r docs/_build/* artifacts/docs/readthedocs/
- name: Build documentation with Scality theme
run: rm -rf docs/_build && tox --workdir /tmp/tox -e docs -- html
- name: Copy generated docs with Scality theme
run: cp -r docs/_build/* artifacts/docs/ && cp CHANGELOG.md artifacts/docs/
- name: Upload artifacts
uses: scality/action-artifacts@v4
with:
method: upload
url: https://artifacts.scality.net
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: artifacts