Merge pull request 'Test Action' (#2) from Action_Fix into master
Reviewed-on: http://mkb.local:3000/yuysh/Manlink_Doc/pulls/2
This commit is contained in:
@@ -2,7 +2,7 @@ name: Build and Deploy Sphinx Docs
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [closed]
|
types: [opened, synchronize, reopened]
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -81,7 +81,20 @@ jobs:
|
|||||||
echo "Build output contents:"
|
echo "Build output contents:"
|
||||||
ls -la /home/ly0kos/work/test_env/build/
|
ls -la /home/ly0kos/work/test_env/build/
|
||||||
|
|
||||||
# 第四步:部署到Web服务器
|
name: Deploy on Merge
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
# 关键:只在PR被成功merge时运行
|
||||||
|
if: github.event.pull_request.merged == true
|
||||||
|
runs-on: linux
|
||||||
|
steps:
|
||||||
|
# 第一步:部署到Web服务器
|
||||||
- name: Deploy to web server
|
- name: Deploy to web server
|
||||||
run: |
|
run: |
|
||||||
echo "=== Deploying to web server ==="
|
echo "=== Deploying to web server ==="
|
||||||
@@ -95,7 +108,7 @@ jobs:
|
|||||||
echo "Web server contents:"
|
echo "Web server contents:"
|
||||||
ls -la /var/www/docs_dev/ | head -10
|
ls -la /var/www/docs_dev/ | head -10
|
||||||
|
|
||||||
# 第五步:清理临时工作树
|
# 第二步:清理临时工作树
|
||||||
- name: Cleanup temporary worktree
|
- name: Cleanup temporary worktree
|
||||||
run: |
|
run: |
|
||||||
echo "=== Cleaning up ==="
|
echo "=== Cleaning up ==="
|
||||||
|
|||||||
Reference in New Issue
Block a user