chs/.drone.yml
Ashhhleyyy 1f5bbae8a9
Some checks failed
continuous-integration/drone/push Build is failing
feat: add CI
2022-11-02 14:48:36 +00:00

34 lines
778 B
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: Build frontend
image: node-pnpm:16-alpine
commands:
- pnpm build
- name: Build server binary
image: rust:1.64.0-alpine
commands:
- cargo build --release
- name: Deploy site
image: alpine
commands:
- apk add curl ca-certificates zip
- cd dist && zip -r ../deploy.zip * && cd ..
- 'curl --fail --upload-file target/release/chs -H "Authorization: $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/v1/packages/ash/generic/chs/$DRONE_COMMIT_SHA/chs'
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
trigger:
event: [push]
branch: [main]