-
Notifications
You must be signed in to change notification settings - Fork 106
68 lines (58 loc) · 1.75 KB
/
staging-docs.yml
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
---
name: Publish staging-docs.pulpproject.org
on:
schedule:
# * is a special character in YAML so you have to quote this string
# runs at 3:00 UTC daily on weekdays 1 to 5 (no weekends)
- cron: '00 3 * * 1-5'
workflow_dispatch:
defaults:
run:
working-directory: "pulpcore"
jobs:
build-staging-docs:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: "pulpcore"
- uses: "actions/setup-python@v4"
with:
python-version: "3.9"
- name: "Build HTML site for staging-docs.pulpproject.org."
run: |
.github/workflows/scripts/build_all_docs.sh
- name: "Upload documentation site"
uses: "actions/upload-artifact@v3"
with:
name: "staging-docs.pulpproject.org.tar"
path: "pulpcore/staging-docs.pulpproject.org.tar"
if-no-files-found: "error"
publish-staging-docs:
runs-on: "ubuntu-latest"
needs:
- "build-staging-docs"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulpcore"
- uses: "actions/setup-python@v4"
with:
python-version: "3.9"
- name: "Setting secrets"
run: |
python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
env:
SECRETS_CONTEXT: "${{ toJson(secrets) }}"
- name: "Download built docs"
uses: "actions/download-artifact@v3"
with:
name: "staging-docs.pulpproject.org.tar"
path: "pulpcore/"
- name: "Publish docs to staging-docs.pulpproject.org"
run: |
.github/workflows/scripts/publish-staging-docs.sh