forked from k8s-operatorhub/community-operators
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.18 KB
/
documentation.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
name: "Documentation"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
number-of-prs:
description: 'Number of PRs'
required: true
default: '100'
env:
OPP_THIS_REPO: "k8s-operatorhub/community-operators"
jobs:
documentation:
runs-on: ubuntu-latest
container: quay.io/operator_testing/community-operators-mkdocs
steps:
- uses: actions/checkout@v3
with:
repository: redhat-openshift-ecosystem/community-operators-pipeline
ref: documentation
- name: Generate docs
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPR: ${{ github.event.inputs.number-of-prs || 100 }}
run: |
OPP_THIS_REPO_SED="https://github.com/$OPP_THIS_REPO"
OPP_THIS_REPO_SED=${OPP_THIS_REPO_SED//\//\\/}
sed -i 's/repo_url.*/repo_url: '$OPP_THIS_REPO_SED'/g' mkdocs.yml
sed -i 's/ cluster_type:.*/ cluster_type: k8s/g' mkdocs.yml
cat mkdocs.yml
ci/operator-flow/doc.sh ${NPR} ${OPP_THIS_REPO}
mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site