Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .github/workflows/deploy.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the optimization, but the actions in this file are what we want, so it's unnecessary to modify this file.

Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Deploy

on:
workflow_dispatch:
push:
branches: [ master ] # 推送到master自动触发

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to trigger the deployment manually to avoid mistake.

workflow_dispatch: # 支持网页手动触发

concurrency:
group: deploy
cancel-in-progress: true # 新构建到来取消旧构建

permissions:
contents: write # 必须:允许action写git分支(gh‑pages)

jobs:
build:
Expand Down Expand Up @@ -32,20 +38,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist
publish_branch: gh-pages

deploy:
needs: build
runs-on: ubuntu-latest

steps:
- name: Deploy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
allenvs: true
script: |
cd /data/wwwroot/www.goravel.dev/ && git pull origin gh-pages
publish_branch: gh-pages
Loading