Skip to content

update README.md by Github Actions #10

update README.md by Github Actions

update README.md by Github Actions #10

name: Generate README
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: git clone https://github.com/tiny656/PAT.git .
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Generate README
run: python GenerateREADME.py
- name: Push
env:
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}
GH_REF: github.com/tiny656/PAT.git
run: |
git config user.name "tiny656" #修改成自己的github用户名
git config user.email "[email protected]" #修改成自己的GitHub邮箱
git add README.md
git diff-index --quiet HEAD || git commit -m "update README.md by Github Actions" --allow-empty && git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:master