Skip to content

Commit d513984

Browse files
committed
ci(fix): PR 时不再尝试发布
1 parent a8e30d6 commit d513984

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/gh-website-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
cache-dependency-path: website/yarn.lock
4343

4444
- name: Setup Pages
45-
if: github.event_name != 'pull_request'
45+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
4646
uses: actions/configure-pages@v5
4747

4848
- name: Enable Corepack
@@ -57,12 +57,13 @@ jobs:
5757
run: yarn build
5858

5959
- name: Upload Pages artifact
60-
if: github.event_name != 'pull_request'
60+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
6161
uses: actions/upload-pages-artifact@v3
6262
with:
6363
path: website/dist
6464

6565
- name: Deploy to Server
66+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
6667
uses: easingthemes/ssh-deploy@main
6768
env:
6869
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}

0 commit comments

Comments
 (0)