Generate Markdown Header File #32
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
name: Generate Markdown Header File | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install Jinja2 requests contentful | |
- name: Generate Markdown files | |
env: | |
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_GRAPHQLTOKEN }} | |
run: | | |
python build/gen_md_header.py template/meta/zh.jinja2 | |
python build/gen_md_header.py template/meta/en.jinja2 | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Automated generation product markdown header |