-
Notifications
You must be signed in to change notification settings - Fork 914
35 lines (33 loc) · 1.09 KB
/
push_to_readme.yaml
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
name: Create YAML on direct push to README
on:
push:
paths:
- "README.md"
jobs:
create_yamls:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: setup python
uses: actions/setup-python@v4
with:
python-version: "3.9" #install the python needed
- name: install dependencies
run: pip install pyyaml
- name: sort readme # sorting readmde
run: |
python sort.py
- name: execute py script - create YAMLs # run file
run: |
python create_yamls.py
- name: Commit files # transfer the new html files back into the repository
run: |
git config --local user.name ${{ github.actor }}
git add --all
git commit -m "Generating new YAMLs from the direct push to README"
- name: Push changes # push the output folder to your repo
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true