2022-11-02 14:48:36 +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: Build frontend
|
|
|
|
image: node-pnpm:16-alpine
|
|
|
|
commands:
|
|
|
|
- pnpm build
|
|
|
|
- name: Build server binary
|
|
|
|
image: rust:1.64.0-alpine
|
|
|
|
commands:
|
2022-11-02 15:06:59 +00:00
|
|
|
- apk add --no-cache musl-dev
|
2022-11-02 14:48:36 +00:00
|
|
|
- cargo build --release
|
|
|
|
- name: Deploy site
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- apk add curl ca-certificates zip
|
2022-11-02 19:48:37 +00:00
|
|
|
- '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'
|
2022-11-02 14:48:36 +00:00
|
|
|
environment:
|
|
|
|
GITEA_TOKEN:
|
|
|
|
from_secret: GITEA_TOKEN
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event: [push]
|
|
|
|
branch: [main]
|