mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-03 22:01:39 +00:00
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Push wiki
|
|
permissions:
|
|
contents: write
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'wiki/**'
|
|
jobs:
|
|
pushwiki:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout GAM source
|
|
uses: actions/checkout@master
|
|
with:
|
|
path: GAM
|
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
|
|
|
- name: Checkout Wiki source
|
|
uses: actions/checkout@master
|
|
with:
|
|
path: GAM.wiki
|
|
repository: GAM-team/GAM.wiki
|
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
|
|
|
- name: Overwrite all wiki files from main git to wiki git
|
|
run: |
|
|
# remove all wiki repo files so deletes work
|
|
rm -fv GAM.wiki/*.md
|
|
# copy all files from main GAM repo wiki folder
|
|
cp -fv GAM/wiki/*.md GAM.wiki/
|
|
|
|
- name: Commit wiki changes
|
|
run: |
|
|
cd GAM.wiki
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add *.md
|
|
git commit -m "[no ci] Push Wiki changes"
|
|
git status
|
|
# git push
|