-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert "Update sync-wiki.yml" This reverts commit 0594b03. * Sync wiki homepage to README page * Always prefer wiki/ and README files * Sync all wiki files in one syep * Use correct file name for wiki home page
- Loading branch information
Showing
2 changed files
with
1 addition
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,6 @@ on: | |
paths: | ||
- 'wiki/**' | ||
- 'README.md' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'wiki/**' | ||
- 'README.md' | ||
|
||
jobs: | ||
sync: | ||
|
@@ -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 . | ||
|
This file was deleted.
Oops, something went wrong.