z0x.ca/.gitea/workflows/build-dist.yaml
2025-01-25 13:28:27 -05:00

46 lines
No EOL
991 B
YAML

name: Build and Deploy Dist
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
- name: Setup bun.sh
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Update dependencies and build
run: |
bun install
bun run build
- name: Checkout dist branch
uses: actions/checkout@v4
with:
ref: dist
clean: false
- name: Copy dist contents
run: |
git rm -rf .
git checkout main -- dist
mv dist/* .
rm -rf dist
- name: Commit and push to dist branch
run: |
git config user.name "gitea-actions[bot]"
git config user.email "gitea-actions[bot]@git.z0x.ca"
git add -A
git commit -m "ci(dist): build dist"
git push origin dist