-
Notifications
You must be signed in to change notification settings - Fork 455
34 lines (32 loc) · 970 Bytes
/
sync-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
name: Sync wiki
on:
push:
branches:
- master
paths:
- 'wiki/**'
- 'README.md'
jobs:
sync:
if: github.repository == 'lichess-bot-devs/lichess-bot'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Checkout wiki
uses: actions/checkout@v4
with:
repository: "${{ github.repository }}.wiki"
path: "lichess-bot.wiki"
- name: Set github bot global config
run: |
git config --global user.email "[email protected]"
git config --global user.name "actions-user"
- name: Sync all files to wiki
run: |
cp $GITHUB_WORKSPACE/README.md $GITHUB_WORKSPACE/lichess-bot.wiki/Home.md
cp -r $GITHUB_WORKSPACE/wiki/* $GITHUB_WORKSPACE/lichess-bot.wiki
cd $GITHUB_WORKSPACE/lichess-bot.wiki
git add .
git commit -m "Auto update wiki"
git push