push -f #33
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
on: push | |
jobs: | |
publish_site: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: 检出当前代码库 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# Step 2: 调试当前目录(可选) | |
- name: Debug Current Directory | |
run: | | |
pwd | |
ls -a | |
# Step 3: 安装 GitBook CLI 并验证 | |
- name: Install GitBook | |
run: | | |
npm install [email protected] --global | |
gitbook -V | |
gitbook install | |
# Step 4: 配置 Git 用户信息 | |
- name: Configure Git | |
run: | | |
git config --global user.name "LJHG" | |
git config --global user.email "[email protected]" | |
# Step 5: 推送到目标仓库 | |
- name: Push Sites | |
env: | |
PASSWORD: ${{ secrets.PASSWORD }} | |
run: ./publish.sh |