This commit is contained in:
parent
b32f52dbe8
commit
5c52702f33
37
.gitea/workflows/build-deploy.yml
Normal file
37
.gitea/workflows/build-deploy.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Build and Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Deploy to server
|
||||||
|
uses: appleboy/scp-action@v0.1.7
|
||||||
|
with:
|
||||||
|
host: baishe.honor3.com
|
||||||
|
port: 22
|
||||||
|
username: root
|
||||||
|
password: ${{ secrets.SSH_PWD }}
|
||||||
|
source: "dist/*"
|
||||||
|
target: "/app/staticwebs/seckit"
|
||||||
Loading…
Reference in New Issue
Block a user