init: game template #3
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 README | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "challenges/**" | |
- "scripts/gen_readme.py" | |
- "scripts/note.md" | |
workflow_dispatch: | |
jobs: | |
action-generate: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Generate README | |
run: | | |
python3 scripts/gen_readme.py | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Prettier format | |
run: | | |
npm install -g prettier | |
prettier --write README.md | |
- name: Commit and push changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "docs: update README" | |
add: README.md |