forked from imsyy/home
-
Notifications
You must be signed in to change notification settings - Fork 0
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
f92a4b8
commit 1fb7c0f
Showing
1 changed file
with
30 additions
and
8 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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# feature-my-homepage 分支推送部署预览 | ||
## 仅部署 Win 端 | ||
name: Build Source Code | ||
|
||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature-my-homepage | ||
|
||
jobs: | ||
release: | ||
build: | ||
name: Build Website | ||
runs-on: windows-latest | ||
|
||
|
@@ -49,10 +49,22 @@ jobs: | |
with: | ||
name: Homepage | ||
path: dist | ||
|
||
# TODO 以下是自动化将打包的静态页面部署到 gh-pages 分支和我自己服务器的脚本 | ||
|
||
# 部署到 gh-pages 分支 | ||
# TODO 以下是自动化将打包的静态页面部署到 gh-pages 分支和我自己服务器的脚本 | ||
# 为了互不影响,采用并行执行的方式 | ||
|
||
deploy-gh-pages: | ||
name: Deploy to gh-pages | ||
runs-on: ubuntu-latest | ||
needs: build # 表示依赖于 build 作业完成 | ||
steps: | ||
- name: Download artifact | ||
# 链接 https://github.com/actions/download-artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Homepage | ||
path: dist | ||
|
||
- name: Deploy to gh-pages | ||
# 链接 https://github.com/crazy-max/ghaction-github-pages/ | ||
uses: crazy-max/[email protected] | ||
|
@@ -65,12 +77,22 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | ||
|
||
# 部署到我个人的服务器 | ||
deploy-server: | ||
name: Deploy to My Own Server | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Homepage | ||
path: public | ||
|
||
- name: Deploy to My Own Server | ||
# 链接 https://github.com/easingthemes/ssh-deploy | ||
uses: easingthemes/[email protected] | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# ARGS: "-rlgoDzvc -i" | ||
ARGS: "-avzr --delete" | ||
SOURCE: "public/" | ||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | ||
|