Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
aminakhshi committed Mar 28, 2024
2 parents 6152911 + 0b505fb commit dcb00b3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/sync-readme.yml
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 }}

0 comments on commit dcb00b3

Please sign in to comment.