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:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build and Push
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main branch
|
- name: Checkout main branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup bun.sh
|
- name: Install dependencies
|
||||||
uses: oven-sh/setup-bun@v2
|
run: bun install
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
|
|
||||||
- name: Update dependencies and build
|
- name: Build
|
||||||
run: |
|
run: bun run build
|
||||||
bun install
|
|
||||||
bun run build
|
|
||||||
|
|
||||||
- name: Checkout dist branch
|
- name: Push
|
||||||
uses: actions/checkout@v4
|
uses: s0/git-publish-subdir-action@develop
|
||||||
with:
|
env:
|
||||||
ref: dist
|
REPO: git@git.home.arpa:z0x/z0x.ca.git
|
||||||
clean: false
|
BRANCH: build
|
||||||
|
FOLDER: dist
|
||||||
- name: Copy dist contents
|
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}
|
||||||
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
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue