更新OS文档 #90
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 | |
env: | |
user_name: ${{ secrets.USER_NAME }} | |
user_email: ${{ secrets.USER_EMAIL }} | |
run: | | |
git config user.name "$user_name" | |
git config user.email "$user_email" | |
- 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 |