forked from osuAkatsuki/bancho.py
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.65 KB
/
sync-docs.yaml
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
name: Sync wiki documentation
on:
push:
branches:
- master
paths:
- '.github/docs/wiki/**'
repository_dispatch:
types: [docs]
gollum:
env:
REPO_PATH: '.github/docs/wiki'
WIKI_PATH: 'wiki'
GIT_USERNAME: 'github-actions[bot]'
GIT_EMAIL: '[email protected]'
GIT_COMMIT_MESSAGE: 'docs: Bidirectional sync between docs and wiki'
jobs:
sync-docs-to-wiki:
if: github.repository == 'osuAkatsuki/bancho.py' && github.event_name != 'gollum'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Push files into wiki repo
uses: newrelic/wiki-sync-action@main
with:
source: ${{ env.REPO_PATH }}
destination: ${{ env.WIKI_PATH }}
branch: master
token: ${{ secrets.BPY_REPO_TOKEN }}
gitAuthorName: ${{ env.GIT_USERNAME }}
gitAuthorEmail: ${{ env.GIT_EMAIL }}
commitMessage: ${{ env.GIT_COMMIT_MESSAGE }}
sync-wiki-to-docs:
if: github.repository == 'osuAkatsuki/bancho.py' && github.event_name == 'gollum'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: master
- name: Push files into repo
uses: newrelic/wiki-sync-action@main
with:
source: ${{ env.WIKI_PATH }}
destination: ${{ env.REPO_PATH }}
branch: master
token: ${{ secrets.GITHUB_TOKEN }}
gitAuthorName: ${{ env.GIT_USERNAME }}
gitAuthorEmail: ${{ env.GIT_EMAIL }}
commitMessage: ${{ env.GIT_COMMIT_MESSAGE }}