ci: add auto-deploy step
All checks were successful
build-deploy / build-deploy (push) Successful in 11s
All checks were successful
build-deploy / build-deploy (push) Successful in 11s
This commit is contained in:
parent
4e42ea531f
commit
11d38ecc31
@ -1,11 +1,11 @@
|
|||||||
name: build
|
name: build-deploy
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Build & push iloom-frontend
|
- name: Build & push iloom-frontend
|
||||||
@ -23,3 +23,13 @@ jobs:
|
|||||||
docker push "$REG/iloom-frontend:latest"
|
docker push "$REG/iloom-frontend:latest"
|
||||||
rm -rf "$workdir"
|
rm -rf "$workdir"
|
||||||
echo "done: iloom-frontend pushed at $TAG + latest"
|
echo "done: iloom-frontend pushed at $TAG + latest"
|
||||||
|
|
||||||
|
- name: Deploy to dev-chiba
|
||||||
|
run: |
|
||||||
|
set -eo pipefail
|
||||||
|
app="$HOME/apps/iloom"
|
||||||
|
[ -d "$app" ] || { echo "!! $app 未部署,跳过"; exit 0; }
|
||||||
|
cd "$app"
|
||||||
|
docker compose pull frontend
|
||||||
|
docker compose up -d frontend
|
||||||
|
echo "deployed: frontend"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user