Tobias Berger
ff2414a319
All checks were successful
continuous-integration/drone/push Build is passing
81 lines
1.5 KiB
YAML
81 lines
1.5 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
|
|
workspace:
|
|
path: /drone/svelte-sharg
|
|
|
|
# Check if the game builds
|
|
# If yes, test if everything is nice
|
|
# If yes, deploy to vercel
|
|
|
|
steps:
|
|
- name: install
|
|
image: node
|
|
commands:
|
|
- yarn
|
|
- name: build-game
|
|
image: node
|
|
commands:
|
|
- yarn build:game
|
|
depends_on:
|
|
- install
|
|
- name: build-pwa
|
|
image: node
|
|
commands:
|
|
- yarn build:pwa
|
|
depends_on:
|
|
- install
|
|
- name: prettier
|
|
image: node
|
|
commands:
|
|
- yarn lint:prettier:all
|
|
depends_on:
|
|
- build-game
|
|
- build-pwa
|
|
- name: eslint
|
|
image: node
|
|
commands:
|
|
- yarn lint:eslint --max-warnings=0
|
|
depends_on:
|
|
- build-game
|
|
- build-pwa
|
|
- name: type-check
|
|
image: node
|
|
commands:
|
|
- yarn type-check
|
|
depends_on:
|
|
- build-game
|
|
- build-pwa
|
|
- name: deploy (production)
|
|
image: dockette/vercel
|
|
environment:
|
|
VERCEL_TOKEN:
|
|
from_secret: VERCEL_TOKEN
|
|
VERCEL_SCOPE:
|
|
from_secret: VERCEL_SCOPE
|
|
commands:
|
|
- vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c
|
|
when:
|
|
branch:
|
|
- main
|
|
depends_on:
|
|
- prettier
|
|
- eslint
|
|
- type-check
|
|
- name: deploy (preview)
|
|
image: dockette/vercel
|
|
environment:
|
|
VERCEL_TOKEN:
|
|
from_secret: VERCEL_TOKEN
|
|
VERCEL_SCOPE:
|
|
from_secret: VERCEL_SCOPE
|
|
commands:
|
|
- vercel -t $VERCEL_TOKEN --scope $VERCEL_SCOPE -c
|
|
when:
|
|
branch:
|
|
exclude:
|
|
- main
|
|
depends_on:
|
|
- prettier
|
|
- eslint
|
|
- type-check
|