From 6e871f95602cee298047477f71d10b7c34dd4409 Mon Sep 17 00:00:00 2001 From: z0x Date: Sat, 25 Jan 2025 14:29:09 -0500 Subject: [PATCH] fix(actions) --- .gitea/workflows/build-dist.yaml | 46 ++++++++++---------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/build-dist.yaml b/.gitea/workflows/build-dist.yaml index 3797908..6da8ccb 100644 --- a/.gitea/workflows/build-dist.yaml +++ b/.gitea/workflows/build-dist.yaml @@ -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: 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 \ No newline at end of file + - name: Build + run: bun run build + + - 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 }}