fix(actions)
This commit is contained in:
parent
97d675aee4
commit
6e871f9560
1 changed files with 14 additions and 32 deletions
|
@ -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
|
||||
- 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 }}
|
||||
|
|
Loading…
Add table
Reference in a new issue