2022-08-09 00:38:49 +00:00
|
|
|
pipeline:
|
|
|
|
deps:
|
|
|
|
image: node:alpine
|
|
|
|
commands:
|
|
|
|
- cd frontend
|
|
|
|
- npm install --save-dev
|
|
|
|
eslint:
|
|
|
|
image: node:alpine
|
|
|
|
commands:
|
|
|
|
- cd frontend
|
|
|
|
- npm run lint
|
|
|
|
group: build
|
|
|
|
svelte:
|
|
|
|
image: node:alpine
|
|
|
|
commands:
|
|
|
|
- cd frontend
|
|
|
|
- npm run build
|
2022-08-09 01:14:02 +00:00
|
|
|
group: build
|
2022-08-09 00:38:49 +00:00
|
|
|
docker build:
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: git.koval.net/cyclane/game-algorithms/frontend
|
|
|
|
tags: latest
|
|
|
|
context: frontend
|
|
|
|
dockerfile: frontend/Dockerfile
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude: [main]
|
|
|
|
path:
|
|
|
|
include:
|
|
|
|
- frontend/*
|
|
|
|
- .woodpecker/frontend.yml
|
|
|
|
docker build and publish:
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
registry: git.koval.net
|
|
|
|
username: cyclane
|
|
|
|
password:
|
|
|
|
from_secret: DEPLOY_TOKEN
|
|
|
|
repo: git.koval.net/cyclane/game-algorithms/frontend
|
|
|
|
tags: latest
|
|
|
|
context: frontend
|
|
|
|
dockerfile: frontend/Dockerfile
|
|
|
|
when:
|
|
|
|
branch: main
|
|
|
|
path:
|
|
|
|
include:
|
|
|
|
- frontend/*
|
|
|
|
- .woodpecker/frontend.yml
|
2022-08-09 01:14:02 +00:00
|
|
|
deploy:
|
|
|
|
image: plugins/ssh
|
|
|
|
settings:
|
|
|
|
host: 192.168.3.5
|
|
|
|
username: root
|
|
|
|
key:
|
|
|
|
from_secret: SSH_KEY
|
|
|
|
script:
|
|
|
|
- docker stop game-algorithms || echo No existing deployment
|
|
|
|
- docker rm game-algorithms || echo No existing deployment
|
|
|
|
- docker image rm git.koval.net/cyclane/game-algorithms/frontend:latest || echo No existing image
|
|
|
|
- docker pull git.koval.net/cyclane/game-algorithms/frontend:latest
|
|
|
|
- docker run --name game-algorithms -p 3000:3000 -d git.koval.net/cyclane/game-algorithms/frontend:latest
|
|
|
|
when:
|
|
|
|
branch: main
|
|
|
|
path:
|
|
|
|
include:
|
|
|
|
- frontend/*
|
|
|
|
- .woodpecker/frontend.yml
|
|
|
|
depends_on:
|
|
|
|
- wasm-o-x-rust
|