Skip to content

Commit 4fac209

Browse files
committed
fix(ci): build runs on every commits/deploy is only for gh-pages
1 parent a1a5f07 commit 4fac209

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ name: Build and Deploy Jekyll site
22

33
on:
44
push:
5-
branches:
6-
- gh-pages
5+
pull_request:
76

8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
127

138
jobs:
149
build:
@@ -46,6 +41,11 @@ jobs:
4641
name: github-pages
4742
url: ${{ steps.deployment.outputs.page_url }}
4843
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
46+
pages: write
47+
id-token: write
48+
if: github.ref == 'refs/heads/gh-pages'
4949
steps:
5050
- name: Deploy to GitHub Pages
5151
id: deployment

0 commit comments

Comments
 (0)