瀏覽代碼

指定只有main更新时才部署pages (#3)

* 指定只有main更新时才部署pages
LoGin 1 年之前
父節點
當前提交
e861661d6b
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      .github/workflows/build.yml

+ 7 - 1
.github/workflows/build.yml

@@ -1,5 +1,11 @@
 name: Build and Deploy
-on: [ push, pull_request ]
+
+on:
+  push:
+    branches: [ "main" ]
+  pull_request:
+    branches: [ "main" ]
+
 jobs:
   build-and-deploy:
     runs-on: ubuntu-latest