forked from ChunYen-Chen/CheckNode
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.33 KB
/
bi-directional_wiki.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
name: Documentation
on:
push:
branches:
- branch_for_wiki
paths:
- "wiki_docs/**"
repository_dispatch:
types: [wiki_docs]
workflow_dispatch:
gollum:
env:
GIT_AUTHOR_NAME: Actionbot
GIT_AUTHOR_EMAIL: [email protected]
jobs:
job-sync-docs-to-wiki:
runs-on: ubuntu-latest
if: github.event_name != 'gollum'
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Sync docs to wiki
uses: newrelic/wiki-sync-action@main
with:
source: wiki_docs
destination: wiki # wiki repo
token: ${{ secrets.TOKEN_FOR_WIKI }}
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }}
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }}
job-sync-wiki-to-docs:
runs-on: ubuntu-latest
if: github.event_name == 'gollum'
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.TOKEN_FOR_WIKI }} # allows us to push back to repo
ref: branch_for_wiki
- name: Sync Wiki to Docs
uses: newrelic/wiki-sync-action@main
with:
source: wiki
destination: wiki_docs
token: ${{ secrets.TOKEN_FOR_WIKI }}
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }}
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }}
branch: branch_for_wiki