Skip to content

Commit

Permalink
fix: deploy 脚本修改
Browse files Browse the repository at this point in the history
  • Loading branch information
joywins-y committed Mar 10, 2024
1 parent 58a907e commit 6325d14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
run: |
npm run docs:build
zip -r vuepress ./vuepress/**
# 部署到 GitHub Pages
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
branch: gh-pages # 要部署到的分支
folder: vuepress # 构建产物的文件夹
clean: true # 清除 gh-pages 分支上的旧文件
# 产物上传服务器
# - name: Upload to Deploy Server
# uses: easingthemes/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ git init
git add -A
git commit -m 'deploy'

# Create and switch to the main branch
git branch -M main

# if you are deploying to https://<USERNAME>.github.io
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master

# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f https://github.com/joywins-y/blog-docs.git main:gh-pages
git push -f git@github.com:joywins-y/blog-docs.git main:gh-pages



Expand Down

0 comments on commit 6325d14

Please sign in to comment.