小修改 #58
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: main to gh-pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
m2p: | |
permissions: | |
contents: write | |
actions: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Git | |
run: | | |
git config user.name "Mdr-C-Tutorial" | |
git config user.email "[email protected]" | |
- name: Merge | |
run: | | |
git checkout gh-pages | |
git merge main -m "Merge branch 'main' into gh-pages" || printf 'skip' | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
- name: Link Fix | |
run: | | |
cd ./教程/示例代码 | |
python linkfix.py | |
git add . | |
git commit -m "linkfix" || printf 'skip' | |
cd ../../ | |
- name: Push | |
run: git push |