-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (33 loc) · 1.08 KB
/
generate_readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Generate automaticially a markdown README from restructuredtext
name: Generate Markdown Readme
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
# Single deploy job since we're just deploying
build:
name: build_readme
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Convert to Markdown
run: |
sudo apt-get install pandoc
pip install pandocfilters
pandoc -s --filter docs/conversion_filter.py docs/README.rst -o README.md
- name: Check in README.md
run: |
git config --global user.name 'GH Action'
git config --global user.email '[email protected]'
git add README.md
git diff-index --quiet HEAD || git commit -m "auto README.md generation"
git push