Create cd_wiki.yaml #1
Workflow file for this run
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: Wiki CD | |
on: | |
push: | |
branches: | |
- 'wiki-round-3' | |
paths: | |
- 'docs/wiki/*.md' | |
concurrency: | |
group: 'wiki-cd' | |
cancel-in-progress: true | |
jobs: | |
cd_wiki: | |
name: Wiki deployment | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout endless-sky repository | |
run: | | |
git clone https://github.com/warp-core/endless-sky.git | |
cd endless-sky | |
git checkout ${{ github.ref_name }} | |
- name: Checkout wiki | |
run: git clone https://github.com/warp-core/endless-sky.wiki.git | |
- name: Synchronise | |
run: rsync --delete -vh "endless-sky/docs/wiki/" "endless-sky.wiki/" | |
- name: Commit changes | |
run: | | |
cd endless-sky.wiki | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git add . | |
git commit -m "Update" -m "${{ github.sha }}" -m "Triggered by ${{ github.actor }}" | |
- name: Push changes | |
run: | | |
cd endless-sky.wiki | |
git push origin |