forked from PMarzahn/sense
-
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.
add github workflow to convert rst to md and push
- Loading branch information
Showing
1 changed file
with
32 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,32 @@ | ||
name: Convert README from RST to Markdown | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
update_readme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 # Automatically checks out the branch that triggered the workflow | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "Thomas Weiß" | ||
git config user.email "[email protected]" | ||
- name: Install Pandoc | ||
run: sudo apt-get update && sudo apt-get install pandoc | ||
|
||
- name: Convert README.rst to README.md | ||
run: pandoc README.rst -f rst -t markdown -o README.md | ||
|
||
- name: Commit changes | ||
run: | | ||
git add README.md | ||
git commit -m "Convert README.rst to README.md" | ||
# Use GITHUB_TOKEN to push changes directly to the current branch | ||
- name: Push changes | ||
run: git push origin HEAD | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Uses the default GitHub Actions token |