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:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build & push iloom-frontend
|
||||
@ -23,3 +23,13 @@ jobs:
|
||||
docker push "$REG/iloom-frontend:latest"
|
||||
rm -rf "$workdir"
|
||||
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