Skip to content

Commit

Permalink
ci: setup new branch for blog
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbenben committed Mar 1, 2024
1 parent cb4a8d7 commit b8c489c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 端口
Expand Down

0 comments on commit b8c489c

Please sign in to comment.