-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (35 loc) · 1.02 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
on:
workflow_dispatch:
release:
types:
- released
jobs:
upload_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: pip install mkdocs-material pygments
- name: Build docs
run: mkdocs build -d /tmp/docs
- uses: actions/checkout@v2
with:
ref: gh-pages
- name: Commit files
continue-on-error: true
run: |
ls -A | grep -vE "^(.git|.gitignore|helm_releases)" | xargs rm -rfv
cp -a /tmp/docs/. .
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git add .
git commit -m "Docs update"
- name: Push changes
uses: ad-m/github-push-action@master
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages