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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-dist:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build and Push
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main branch
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup bun.sh
|
- name: Setup bun.sh
|
||||||
|
@ -19,29 +19,14 @@ jobs:
|
||||||
bun-version: latest
|
bun-version: latest
|
||||||
|
|
||||||
- name: Install dependencies
|
- 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: |
|
run: |
|
||||||
rm -rf build/*
|
bun install
|
||||||
rm -rf build/.*
|
bun run build
|
||||||
mkdir -p build/dist
|
|
||||||
cp -R dist/* build/dist/
|
|
||||||
|
|
||||||
- name: Commit and Push changes
|
- name: Commit dist
|
||||||
run: |
|
run: |
|
||||||
cd build
|
|
||||||
git config user.name "gitea-actions[bot]"
|
git config user.name "gitea-actions[bot]"
|
||||||
git config user.email "gitea-actions[bot]@git.z0x.ca"
|
git config user.email "gitea-actions[bot]@git.z0x.ca"
|
||||||
git add .
|
git add -f dist
|
||||||
git commit -m "ci(dist): build dist" || echo "No changes to commit"
|
git commit -m "ci(dist): build dist"
|
||||||
git push origin build
|
git push HEAD:build
|
||||||
|
|
Loading…
Add table
Reference in a new issue