ci: add auto-deploy step
All checks were successful
build-deploy / build-deploy (push) Successful in 4s
All checks were successful
build-deploy / build-deploy (push) Successful in 4s
This commit is contained in:
parent
b05ae9d889
commit
b5702eacfd
@ -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 services
|
||||
@ -33,3 +33,15 @@ jobs:
|
||||
done
|
||||
rm -rf "$workdir"
|
||||
echo "done: 5 iloom images 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"
|
||||
svcs="gateway auth-service purchaser-service textile-service washing-service"
|
||||
docker compose pull $svcs
|
||||
docker compose up -d $svcs
|
||||
docker compose ps --format "table {{.Name}}\t{{.Status}}"
|
||||
echo "deployed: $svcs"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user