diff --git a/.gitea/workflows/build-dist.yaml b/.gitea/workflows/build-dist.yaml index 12a6012..0b3cf6f 100644 --- a/.gitea/workflows/build-dist.yaml +++ b/.gitea/workflows/build-dist.yaml @@ -1,16 +1,16 @@ -name: Build and Deploy Dist - +name: build dist on: push: branches: - main + workflow_dispatch: jobs: - build: + build-dist: runs-on: ubuntu-latest - name: Build and Push + steps: - - name: Checkout main branch + - name: Checkout code uses: actions/checkout@v4 - name: Setup bun.sh @@ -19,29 +19,14 @@ jobs: 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: | - rm -rf build/* - rm -rf build/.* - mkdir -p build/dist - cp -R dist/* build/dist/ + bun install + bun run build - - name: Commit and Push changes + - name: Commit dist run: | - cd build git config user.name "gitea-actions[bot]" git config user.email "gitea-actions[bot]@git.z0x.ca" - git add . - git commit -m "ci(dist): build dist" || echo "No changes to commit" - git push origin build + git add -f dist + git commit -m "ci(dist): build dist" + git push HEAD:build