-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Sync README Files | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'README.md' | ||
- 'README.rst' | ||
|
||
jobs: | ||
convert-and-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Pandoc | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y pandoc | ||
- name: Convert README.md to README.rst | ||
run: | | ||
pandoc --from=markdown --to=rst --output=README.rst README.md | ||
- name: Commit and Push | ||
run: | | ||
git config --global user.email "action@github.com" | ||
git config --global user.name "GitHub Action" | ||
git add README.rst | ||
git commit -m "Automatically sync README.rst with README.md" || exit 0 | ||
git push --set-upstream origin HEAD | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |