fix(actions)

This commit is contained in:
z0x 2025-01-25 14:29:09 -05:00
parent 97d675aee4
commit 6e871f9560

View file

@ -4,43 +4,25 @@ on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
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: Update dependencies and build
run: |
bun install
bun run build
- name: Build
run: 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
- name: Push
uses: s0/git-publish-subdir-action@develop
env:
REPO: git@git.home.arpa:z0x/z0x.ca.git
BRANCH: build
FOLDER: dist
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}