Rename v0.9.19.md to Changelog-v0.9.19.md #23
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
name: Mirror to wiki | |
on: [push] | |
jobs: | |
mirror: | |
name: Mirror | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repository | |
uses: actions/checkout@v2 | |
with: | |
path: ./mirror | |
- name: Checkout wiki repository | |
uses: actions/checkout@master | |
with: | |
repository: df-mc/dragonfly.wiki | |
token: ${{ secrets.ACTIONS_SECRET }} | |
path: ./wiki | |
- name: Remove ignored files | |
run: | | |
cd mirror | |
IGNORE=$(cat .wikiignore) | |
rm -rf $IGNORE | |
cd .. | |
- name: Apply changes | |
run: | | |
cp -a mirror/. wiki | |
- name: Push changes | |
run: | | |
cd wiki | |
if ! git diff --exit-code --quiet; then | |
git add . | |
git config user.name github-actions | |
git config user.email [email protected] | |
git commit -am "${{ github.event.head_commit.message }} (@${{ github.event.head_commit.author.name }})" | |
git push | |
fi |