-
Notifications
You must be signed in to change notification settings - Fork 106
58 lines (51 loc) · 1.56 KB
/
wiki.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
57
58
name: Deploy Wiki
on:
push:
# Trigger only when wiki directory changes
paths:
- "wiki/**"
- "uk_bin_collection/tests/input.json"
branches: [ "master" ]
pull_request:
# Trigger only when wiki directory changes
paths:
- "wiki/**"
- "uk_bin_collection/tests/input.json"
# The branches below must be a subset of the branches above
branches: [ "master" ]
jobs:
deploy-wiki:
# Only run on main branch push (e.g. after pull request merge).
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: wiki
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: '1.2.1'
- name: Install
run: make install
- name: Update Councils.md from input.json
run: make update-wiki
- name: Commit and Push Wiki changes
run: |
git config --global user.name "Wiki GitHub Action"
git config --global user.email "[email protected]"
git add wiki
git commit -m "Update Councils.md from input.json"
git push
continue-on-error: true
- name: Deploy Wiki Changes
uses: Andrew-Chen-Wang/github-wiki-action@v4
env:
# Make sure WIKI_DIR ends with / as action uses rsync
WIKI_DIR: wiki/
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_MAIL: ${{ secrets.YOUR_EMAIL }}
GH_NAME: ${{ github.repository_owner }}
EXCLUDED_FILES: "generate_wiki.py"