Create deploy.yml
This commit is contained in:
parent
684f9fc975
commit
eccc7bc0a5
|
|
@ -0,0 +1,28 @@
|
||||||
|
name: 部署秋秋的家
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 拉取代码
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 部署到服务器
|
||||||
|
uses: appleboy/ssh-action@master
|
||||||
|
with:
|
||||||
|
host: $ secrets.ZZ_SERVER_HOST
|
||||||
|
username: $ secrets.ZZ_SERVER_USER
|
||||||
|
key: $ secrets.ZZ_SERVER_KEY
|
||||||
|
script: |
|
||||||
|
cd $ secrets.ZZ_SERVER_PATH /qiuqiu || mkdir -p $ secrets.ZZ_SERVER_PATH /qiuqiu && cd $ secrets.ZZ_SERVER_PATH /qiuqiu
|
||||||
|
git pull origin main || git clone https://github.com/zhizhi200271/guanghulab.git .
|
||||||
|
npm install
|
||||||
|
export ZZ_LLM_API_KEY=$ secrets.ZZ_LLM_API_KEY
|
||||||
|
export ZZ_LLM_BASE_URL=$ secrets.ZZ_LLM_BASE_URL
|
||||||
|
pm2 restart qiuqiu || pm2 start server.js --name qiuqiu --env production
|
||||||
|
pm2 save
|
||||||
|
echo "🍂 秋秋的家部署完成!"
|
||||||
Loading…
Reference in New Issue