2022-08-13 15:38:02 +00:00
|
|
|
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
|
2022-08-13 21:04:21 +00:00
|
|
|
- name: Build
|
2022-08-13 15:38:02 +00:00
|
|
|
image: node-pnpm:16-alpine
|
|
|
|
commands:
|
2022-08-13 21:04:21 +00:00
|
|
|
- pnpm build:site
|
|
|
|
- pnpm build:server
|
2022-08-13 21:41:59 +00:00
|
|
|
environment:
|
2022-08-13 21:42:34 +00:00
|
|
|
GAMESERVER_URL: https://game-server.ashhhleyyy.dev/
|
2022-08-13 21:04:21 +00:00
|
|
|
- name: Deploy
|
2022-08-13 15:38:02 +00:00
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- apk add curl ca-certificates zip
|
2022-08-13 21:04:21 +00:00
|
|
|
- cd dist && zip -r ../deploy-site.zip * && cd ..
|
|
|
|
- cd build && zip -r ../deploy-server.zip * && cd ..
|
2022-08-13 21:18:50 +00:00
|
|
|
- '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'
|
2022-08-13 15:38:02 +00:00
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: GITEA_TOKEN
|
|
|
|
trigger:
|
|
|
|
event: [push]
|
|
|
|
branch: [main]
|