Skip to content

Commit 8876760

Browse files
committed
Improved documentation workflow
Will now always run build test, but will only run deploy action if pushing from the master branch.
1 parent 875379a commit 8876760

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/documentation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: Deploy Documentation to GitHub Pages
1+
name: Test Building (and Deploy Documentation to GitHub Pages)
22

33
on:
4-
workflow_dispatch: {}
4+
workflow_dispatch:
55
push:
6-
branches:
7-
- master
86

97
permissions:
108
contents: read
@@ -23,6 +21,7 @@ jobs:
2321
node-version: 18
2422
cache: npm
2523
- name: Setup Pages
24+
if: ${{ github.repository == 'slusarz/dovecot-fts-flatcurve' && github.ref == 'refs/heads/master' }}
2625
uses: actions/configure-pages@v3
2726
- name: Install Dependencies
2827
run: npm ci
@@ -31,11 +30,13 @@ jobs:
3130
npm run docs:build
3231
touch docs/.vitepress/dist/.nojekyll
3332
- name: Upload Artifact
33+
if: ${{ github.repository == 'slusarz/dovecot-fts-flatcurve' && github.ref == 'refs/heads/master' }}
3434
uses: actions/upload-pages-artifact@v2
3535
with:
3636
path: docs/.vitepress/dist
3737

3838
deploy:
39+
if: ${{ github.repository == 'slusarz/dovecot-fts-flatcurve' && github.ref == 'refs/heads/master' }}
3940
environment:
4041
name: github-pages
4142
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)