fix(actions)
This commit is contained in:
parent
7ec65231b2
commit
9f2c75ab0c
1 changed files with 11 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue