Merge pull request 'ci: deploy custom branch to OpenChamber-CUSTOM' (#7) from ci/deploy-custom into custom
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
name: deploy-custom
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [custom]
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: linux-amd64
|
||||||
|
steps:
|
||||||
|
- name: Show revision
|
||||||
|
run: git -C $GITHUB_WORKSPACE rev-parse --short HEAD
|
||||||
|
- name: Copy workspace to build dir
|
||||||
|
run: |
|
||||||
|
rm -rf /opt/app/deploy/custom-build
|
||||||
|
mkdir -p /opt/app/deploy/custom-build
|
||||||
|
tar -C $GITHUB_WORKSPACE --exclude=.git -cf - . | tar -C /opt/app/deploy/custom-build -xf -
|
||||||
|
- name: Install dependencies
|
||||||
|
run: cd /opt/app/deploy/custom-build && bun install --frozen-lockfile
|
||||||
|
- name: Build web
|
||||||
|
run: cd /opt/app/deploy/custom-build && bun run build:web
|
||||||
|
- name: Verify dist
|
||||||
|
run: test -f /opt/app/deploy/custom-build/packages/web/dist/index.html
|
||||||
|
- name: Swap current symlink
|
||||||
|
run: ln -sfn /opt/app/deploy/custom-build /opt/app/deploy/current
|
||||||
|
- name: Restart service
|
||||||
|
run: sudo systemctl restart openchamber-custom
|
||||||
Reference in New Issue
Block a user