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

Sync wiki changes #911

Merged
Merged
Show file tree
Hide file tree
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
41 changes: 1 addition & 40 deletions .github/workflows/sync-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ on:
paths:
- 'wiki/**'
- 'README.md'
pull_request:
branches:
- master
paths:
- 'wiki/**'
- 'README.md'

jobs:
sync:
Expand All @@ -26,46 +20,13 @@ jobs:
with:
repository: "${{ github.repository }}.wiki"
path: "lichess-bot.wiki"
- name: Set path
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
wiki:
- 'wiki/**'
home:
- 'wiki/Home.md'
readme:
- 'README.md'
- name: Prevent Conflicts
if: |
steps.changes.outputs.home == 'true' &&
steps.changes.outputs.readme == 'true'
run: |
echo "Error: Conflicting changes. Edit either the README.md file or the wiki/Home.md file, not both."
exit 1
- name: Set github bot global config
if: github.event_name == "push"
run: |
git config --global user.email "[email protected]"
git config --global user.name "actions-user"
- name: Sync README.md to wiki/Home.md
if: steps.changes.outputs.readme == 'true' && github.event_name == "push"
run: |
cp -r $GITHUB_WORKSPACE/README.md $GITHUB_WORKSPACE/wiki/Home.md
git add wiki/Home.md
git commit -m "Auto update wiki/Home.md"
git push
- name: Sync wiki/Home.md to README.md
if: steps.changes.outputs.home == 'true' && github.event_name == "push"
run: |
cp -r $GITHUB_WORKSPACE/wiki/Home.md $GITHUB_WORKSPACE/README.md
git add README.md
git commit -m "Auto update README.md"
git push
- name: Sync all files to wiki
if: github.event_name == "push"
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 .
Expand Down
35 changes: 0 additions & 35 deletions wiki/Home.md

This file was deleted.

Loading