Skip to content

Commit 6c0cd78

Browse files
committed
Only deploy when merging to master
1 parent faccdd8 commit 6c0cd78

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
cp -R result/* build
2828
- name: Build documentation
2929
env:
30+
# TODO: change ${OWNER} to ledger prior to merging
3031
OWNER: afh
3132
REPO: ledger
3233
run: |
@@ -37,13 +38,13 @@ jobs:
3738
nix build github:${OWNER}/${REPO}/${LATEST}#web-docs
3839
mkdir -p build/doc
3940
cp result/share/doc/ledger/ledger* build/doc
40-
- name: Setup Pages
41-
uses: actions/configure-pages@v3
4241
- name: Upload artifact
4342
uses: actions/upload-pages-artifact@v1
4443
with:
4544
path: 'build'
45+
4646
deploy:
47+
if: ${{ github.ref == 'refs/heads/master' }}
4748
needs: build
4849
permissions:
4950
contents: read
@@ -54,6 +55,8 @@ jobs:
5455
url: ${{ steps.deployment.outputs.page_url }}
5556
runs-on: ubuntu-latest
5657
steps:
58+
- name: Setup Pages
59+
uses: actions/configure-pages@v3
5760
- name: Deploy to GitHub Pages
5861
id: deployment
5962
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)