Skip to content

Commit afaad70

Browse files
authored
Run build on all branches
Deploy only master branch
1 parent 3f8c38a commit afaad70

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: Deploy to GitHub Pages
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
- push
5+
- workflow_dispatch
6+
7+
permissions:
8+
contents: write
79

810
jobs:
911
deploy:
10-
name: Deploy to GitHub Pages
12+
name: Build
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@v2
@@ -22,6 +24,7 @@ jobs:
2224
run: npm run build
2325

2426
- name: Deploy to GitHub Pages
27+
if: github.ref == 'refs/heads/master'
2528
uses: peaceiris/actions-gh-pages@v3
2629
with:
2730
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)