Skip to content

Commit 4d4da45

Browse files
committed
deploy on a couple additional branches for now, only deploy on those branch updates and not on prs (build only), explicit deploy concurrency safeguard (edge case) and upload the site build for ghp deploy
1 parent 25143d4 commit 4d4da45

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/deploy.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
name: Deploy Docusaurus to GitHub Pages
22

33
on:
4+
# Trigger the workflow on pull requests and pushes to specific branches
45
pull_request:
56
push:
67
branches:
78
- main
9+
- docs-in-hdb
10+
- gh-pages-workflow
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these deployments to complete.
16+
# This shouldn't be necessary for most cases, but it can help avoid conflicts if multiple pushes happen in quick succession.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
820

921
jobs:
1022
build:
@@ -32,11 +44,14 @@ jobs:
3244
- name: Upload Build Artifact
3345
uses: actions/upload-pages-artifact@v3
3446
with:
35-
path: build
47+
path: site/build
3648

3749
deploy:
38-
name: Deploy to GitHub Pages
3950
needs: build
51+
name: Deploy to GitHub Pages
52+
runs-on: ubuntu-latest
53+
# Only deploy on push to specific branches, not on PRs
54+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/docs-in-hdb' || github.ref == 'refs/heads/gh-pages-workflow')
4055

4156
permissions:
4257
pages: write
@@ -46,7 +61,6 @@ jobs:
4661
name: github-pages
4762
url: ${{ steps.deployment.outputs.page_url }}
4863

49-
runs-on: ubuntu-latest
5064

5165
steps:
5266
- name: Deploy to GitHub Pages

0 commit comments

Comments
 (0)