You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
700 B

kind: pipeline
type: exec
name: deploy
platform:
os: linux
arch: amd64
steps:
- name: build-backend
commands:
- cd backend && CGO_ENABLED=0 go build -ldflags="-s -w" -o short-link-server .
- name: build-frontend
commands:
- cd frontend && npm ci && npm run build
- name: deploy
commands:
- cp backend/short-link-server /opt/short-link/short-link-server.new
- cp -r frontend/dist/* /opt/short-link/frontend/
- mv /opt/short-link/short-link-server.new /opt/short-link/short-link-server
- systemctl restart short-link
- systemctl reload caddy
depends_on:
- build-backend
- build-frontend
trigger:
branch:
- main