-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.67 KB
/
.reusable-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
name: docs
permissions: {}
on:
workflow_call:
inputs:
skip:
description: "Want to skip running certain jobs 'none', 'non-required', 'all'?"
type: string
default: "none"
jobs:
docs:
runs-on: ubuntu-latest
if: |
(github.actor != 'dependabot[bot]') &&
inputs.skip != 'all'
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set release env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Configure the git user
run: |
git config user.name "versioning_user"
git config user.email "semgr8s@securesystems.de"
- name: Install python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version-file: '.python-version'
- name: Install poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
with:
version: 1.8.3
virtualenvs-create: false
virtualenvs-in-project: false
installer-parallel: true
- name: Install dependencies
run: |
poetry install --only docs
- name: Deploy
if: inputs.skip != 'non-required'
run: |
if [[ "${GITHUB_REF}" == "refs/tags/v"* ]];
then
mike deploy --push --update-aliases ${RELEASE_VERSION} latest
elif [[ "${GITHUB_REF}" == "refs/heads/dev" ]]; then
mike deploy --push ${RELEASE_VERSION}
else
mkdocs build
fi