Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action to automatically synchronize wiki #1232

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/sync_wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Synchronize Wiki

on:
schedule:
# daily, midnight UTC
- cron: "0 0 * * *"

jobs:
synchronize:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
fetch-depth: 0
- name: Set git credentials
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Fetch
run: |
git remote add upstream ${{ github.server_url }}/${{ github.repository_owner }}/heaps-doc
git fetch upstream master
- name: Merge
run: |
git merge upstream/master --no-edit
- name: Push
run: |
git push