-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.25 KB
/
update_posts.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
name: UpdateDocs
on:
repository_dispatch:
types: [update_docs]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: 'main'
- name: sync docs source
run: |
git submodule update --remote --rebase docs
- name: build docs
run: |
pip install mkdocs-material
mkdocs build
- name: sync to server
uses: burnett01/[email protected]
with:
switches: -rv --delete
path: site/
remote_path: /home/wiki/wiki.sast.fun/
remote_host: wiki.sast.fun
remote_user: wiki
remote_key: ${{ secrets.DEPLOY_KEY }}
- name: commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if $(git diff | grep -q ""); then
git add .
git commit -m "update docs source"
fi
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT }}
force: true
branch: main