chs/.drone.yml
Ashhhleyyy fbafc4d6dd
All checks were successful
continuous-integration/drone/push Build is passing
fix(ci): send token correctly in header
2022-11-02 19:48:37 +00:00

34 lines
766 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:
- apk add --no-cache musl-dev
- cargo build --release
- name: Deploy site
image: alpine
commands:
- apk add curl ca-certificates zip
- 'curl --fail --upload-file target/release/chs -H "Authorization: token $GITEA_TOKEN" https://git.ashhhleyyy.dev/api/packages/ash/generic/chs/$DRONE_COMMIT_SHA/chs'
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
trigger:
event: [push]
branch: [main]