FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
magic-python/.github/workflows/deploy.yml at master · iswbm/magic-python · GitHub
iswbm
/
magic-python
Public
Notifications
You must be signed in to change notification settings
Fork
470
Star
3.4k
Code
Issues
39
Pull requests
6
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
magic-python
/
.github
/
workflows
/
deploy.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
42 lines (38 loc) · 1.68 KB
Breadcrumbs
magic-python
/
.github
/
workflows
/
deploy.yml
Copy path
File metadata and controls
42 lines (38 loc) · 1.68 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name
:
Deploy site files
on
:
push
:
branches
:
-
master
#
只在master上push触发部署
paths-ignore
:
#
下列文件的变更不触发部署,可以自行添加
-
README.md
-
LICENSE
-
md2rst.py
-
source/conf.py
jobs
:
deploy
:
runs-on
:
ubuntu-latest
#
使用ubuntu系统镜像运行自动化脚本
steps
:
#
自动化步骤
-
uses
:
actions/checkout@v2
#
第一步,下载代码仓库
-
name
:
Deploy to Server
#
第二步,rsync推文件
uses
:
AEnterprise/rsync-deploy@v1.0
#
使用别人包装好的步骤镜像
env
:
DEPLOY_KEY
:
${{ secrets.DEPLOY_KEY }}
#
引用配置,SSH私钥
ARGS
:
-avz --delete --exclude='*.pyc'
#
rsync参数,排除.pyc文件
SERVER_PORT
:
${{ secrets.SSH_PORT }}
#
SSH端口
FOLDER
:
./
#
要推送的文件夹,路径相对于代码仓库的根目录
SERVER_IP
:
${{ secrets.SSH_HOST }}
#
引用配置,服务器的host名(IP或者域名domain.com)
USERNAME
:
${{ secrets.SSH_USERNAME }}
#
引用配置,服务器登录名
SERVER_DESTINATION
:
${{ secrets.WORK_HOME }}
#
部署到目标文件夹
-
name
:
Restart server
#
第三步,重新部署服务
uses
:
appleboy/ssh-action@master
env
:
WORK_HOME
:
${{ secrets.WORK_HOME }}
with
:
host
:
${{ secrets.SSH_HOST }}
#
下面三个配置与上一步类似
username
:
${{ secrets.SSH_USERNAME }}
port
:
${{ secrets.SSH_PORT }}
#
SSH端口
key
:
${{ secrets.DEPLOY_KEY }}
#
私钥
script
:
|
cd $WORK_HOME
./rebuild.sh
envs
:
WORK_HOME
#
要传入 script 的环境变量
Back
|
FazBrowse Home
|
New Git URL