-
Notifications
You must be signed in to change notification settings - Fork 11
40 lines (32 loc) · 1.1 KB
/
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
name: Update page
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Get the latest tag
run: echo "version=$(git describe --tags --abbrev=0 | cut -c 2-)" >> $GITHUB_ENV
- name: Replace current version in documentation
uses: cschleiden/replace-tokens@master
with:
files: 'docs/getting-started.md'
env:
entries: "${{ env.entries }}"
- name: Set up Python
uses: actions/setup-python@v5
- name: Install mkdocs
run: pip install --upgrade pip && pip install mkdocs mkdocs-gen-files
- name: Setup git
run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Publish docs
run: mkdocs gh-deploy