mirror of
https://github.com/henry4682/linebot_finance.git
synced 2026-05-16 04:41:52 +00:00
20 lines
510 B
YAML
20 lines
510 B
YAML
name: Oracle-Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
redeploy:
|
|
# 這裡必須跟剛才在 config.yaml 填的一模一樣
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Sync and Deploy
|
|
run: |
|
|
cd /home/ubuntu/apps/linebot_finance || exit 1
|
|
git fetch origin main
|
|
git reset --hard origin/main
|
|
# 宿主機模式下,這裡就能直接用到 docker 了
|
|
docker compose up -d --build --remove-orphans
|
|
docker image prune -f |