doodly/.drone.yml
Ashhhleyyy 726c7df9cb
All checks were successful
continuous-integration/drone/push Build is passing
fix(deploy): oops!
2022-08-13 22:42:34 +01:00

36 lines
1.1 KiB
YAML

kind: pipeline
type: docker
name: Build
platform:
os: linux
arch: arm64
steps:
- name: Install dependencies
image: node-pnpm:16-alpine
commands:
- pnpm install --frozen-lockfile
- name: Check formatting
image: node-pnpm:16-alpine
commands:
- pnpm format:check
- name: Build
image: node-pnpm:16-alpine
commands:
- pnpm build:site
- pnpm build:server
environment:
GAMESERVER_URL: https://game-server.ashhhleyyy.dev/
- name: Deploy
image: alpine
commands:
- apk add curl ca-certificates zip
- cd dist && zip -r ../deploy-site.zip * && cd ..
- cd build && zip -r ../deploy-server.zip * && cd ..
- 'curl --fail --upload-file deploy-site.zip -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/doodly/$DRONE_COMMIT_SHA-site/doodly-site.zip'
- 'curl --fail --upload-file deploy-server.zip -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/doodly/$DRONE_COMMIT_SHA-server/doodly-server.zip'
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
trigger:
event: [push]
branch: [main]