Debian Codegraph @

ansible_collections/cisco/meraki/.github/workflows/docs.yml

raw
1 name: docs
2
3 on:
4 push:
5 tags:
6 - v[0-9]+.[0-9]+.[0-9]+
7 branches:
8 - main
9
10 jobs:
11 docs:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v2
15 - name: configure git
16 run: |
17 git config user.name "${GITHUB_ACTOR}"
18 git config user.email "${GITHUB_ACTOR}@bots.github.com"
19 git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
20 - name: Set up Python
21 uses: actions/setup-python@v5
22 with:
23 python-version: "3.8"
24 - name: Install dependencies
25 run: |
26 pip install antsibull-docs
27 make doc-setup
28 - name: Build docs
29 run: make doc
30 - name: commit docs
31 run: |
32 git checkout gh-pages || git checkout -b gh-pages
33 rm -rf $(basename ${GITHUB_REF})
34 mv docs/_build/html $(basename ${GITHUB_REF})
35 git show origin/main:docs/_gh_include/header.inc > index.html
36 (echo main; dirname v*/index.html | sort --version-sort --reverse) \
37 | xargs -I@@ \
38 -n1 echo '<div class="col-md-4 center"><a href="@@/" class="btn-doc btn">' \
39 '<i class="fa fa-newspaper-o"></i><p>@@</p></a></div>' >> index.html
40 git show origin/main:docs/_gh_include/footer.inc >> index.html
41 git add $(basename ${GITHUB_REF}) index.html
42 git commit -m "update docs for $(basename ${GITHUB_REF})" || true
43 - name: push docs
44 run: git push origin gh-pages