Skip to content

Commit

Permalink
add github workflow to convert rst to md and push
Browse files Browse the repository at this point in the history
  • Loading branch information
McWhity committed Oct 12, 2024
1 parent f0399a0 commit de26e60
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/convert_README_rst_to_md.yml
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

0 comments on commit de26e60

Please sign in to comment.