z0x.ca/.gitea/workflows/build-dist.yaml
2025-01-25 14:37:40 -05:00

48 lines
1 KiB
YAML

name: Build and Deploy Dist
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
steps:
- name: Checkout main branch
uses: actions/checkout@v4
- name: Setup bun.sh
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Checkout build branch
uses: actions/checkout@v4
with:
ref: build
path: build
- name: Copy dist to build branch
run: |
mkdir -p build/dist
cp -R dist/* build/dist/
- name: Configure Git
run: |
git config --local user.name "gitea-actions[bot]"
git config --local user.email "gitea-actions[bot]@git.z0x.ca"
- name: Commit and Push changes
run: |
cd build
git add .
git commit -m "ci(dist): build dist" || echo "No changes to commit"
git push origin build