del gitea
This commit is contained in:
+12
-7
@@ -1,29 +1,34 @@
|
|||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
event: [push, manual]
|
event: push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
install:
|
install:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- cd client && npm install
|
- npm ci
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- cd client && npm run lint
|
- npm run lint
|
||||||
depends_on: [install]
|
depends_on: [install]
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: node:20
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- cd client && npm run build
|
- npm run build
|
||||||
depends_on: [install]
|
depends_on: [install]
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
|
environment:
|
||||||
|
DEPLOY_KEY:
|
||||||
|
from_secret: deploy_key
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache openssh rsync
|
- apk add --no-cache openssh rsync
|
||||||
- rsync -e "ssh -i /ssh/deploy_key" -avz --delete client/dist/ root@192.168.1.88:/var/www/
|
- mkdir -p /ssh
|
||||||
secrets: [deploy_key]
|
- echo "$DEPLOY_KEY" > /ssh/deploy_key
|
||||||
|
- chmod 600 /ssh/deploy_key
|
||||||
|
- rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete client/dist/ root@192.168.1.88:/var/www/
|
||||||
depends_on: [lint, build]
|
depends_on: [lint, build]
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
when:
|
|
||||||
branch: main
|
|
||||||
event: push
|
|
||||||
|
|
||||||
steps:
|
|
||||||
install:
|
|
||||||
image: node:20
|
|
||||||
commands:
|
|
||||||
- npm ci
|
|
||||||
|
|
||||||
lint:
|
|
||||||
image: node:20
|
|
||||||
commands:
|
|
||||||
- npm run lint
|
|
||||||
depends_on: [install]
|
|
||||||
|
|
||||||
build:
|
|
||||||
image: node:20
|
|
||||||
commands:
|
|
||||||
- npm run build
|
|
||||||
depends_on: [install]
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
image: alpine:latest
|
|
||||||
environment:
|
|
||||||
DEPLOY_KEY:
|
|
||||||
from_secret: deploy_key
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache openssh rsync
|
|
||||||
- mkdir -p /ssh
|
|
||||||
- echo "$DEPLOY_KEY" > /ssh/deploy_key
|
|
||||||
- chmod 600 /ssh/deploy_key
|
|
||||||
- rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete client/dist/ root@192.168.1.88:/var/www/
|
|
||||||
depends_on: [lint, build]
|
|
||||||
Reference in New Issue
Block a user