-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb4a8d7
commit b8c489c
Showing
1 changed file
with
3 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ on: | |
push: | ||
branches: | ||
# 确保这是你正在使用的分支名称 | ||
- main | ||
- blog | ||
|
||
jobs: | ||
LearnData-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
FTP_HOST: ${{ secrets.ftp_host }} | ||
FTP_HOST: ${{ secrets.ftp_host_blog }} | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
@@ -40,20 +40,13 @@ jobs: | |
pnpm run docs:build | ||
> docs/.vuepress/dist/.nojekyll | ||
- name: Deploy GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
# 指定静态文件部署到的分支 | ||
branch: gh-pages | ||
folder: docs/.vuepress/dist | ||
|
||
# 如果配置了 FTP 服务器密钥,才会执行本步骤,将页面静态文件同步到服务器 | ||
- name: 📂 Sync files | ||
if: env.FTP_HOST != '' | ||
uses: SamKirkland/[email protected] | ||
with: | ||
local-dir: docs/.vuepress/dist/ | ||
server: ${{ secrets.ftp_host }} | ||
server: ${{ secrets.ftp_host_blog }} | ||
username: ${{ secrets.ftp_username }} | ||
password: ${{ secrets.ftp_password }} | ||
port: ${{ secrets.ftp_port }} # 建议更改默认的 21 端口 | ||
|