This commit is contained in:
parent
ad90b440f5
commit
7403e4829f
35
.gitea/workflows/deploy.yml
Normal file
35
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,35 @@
|
||||
name: delpoy
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
|
||||
- name: Build website
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy
|
||||
uses: cross-the-world/ssh-scp-ssh-pipelines@master
|
||||
with:
|
||||
host: 10.20.6.7
|
||||
port: 22
|
||||
user: root
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
first_ssh: |
|
||||
rm -r /root/website
|
||||
mkdir /root/website
|
||||
scp: |
|
||||
'./build/*' => /root/website
|
||||
'./package*' => /root/website
|
||||
last_ssh: |
|
||||
cd /root/website
|
||||
npm i --omit=dev
|
||||
nohup node index.js > /var/log/website 2>&1
|
Loading…
x
Reference in New Issue
Block a user