Skip to content

Commit 04145bf

Browse files
committed
WIP 332 Trigger publication workflow but disable by default
1 parent 16dc563 commit 04145bf

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

.github/workflows/generate-site.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,13 @@ jobs:
7373
name: github-pages
7474
path: public
7575
retention-days: 7
76+
77+
- name: Trigger Publish to Netlify Workflow
78+
uses: benc-uk/workflow-dispatch@v1
79+
with:
80+
workflow: publish-site-to-netlify.yml
81+
82+
- name: Trigger Publish to GitHub Pages Workflow
83+
uses: benc-uk/workflow-dispatch@v1
84+
with:
85+
workflow: publish-site-to-gh-pages.yml

.github/workflows/publish-site-to-gh-pages.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
name: Publish GitHub Pages
1+
name: Publish Site to GitHub Pages
22

33
on:
4+
push:
5+
pull_request:
46
workflow_dispatch:
7+
inputs:
8+
publish_site:
9+
type: boolean
10+
description: 'Publish To GH Pages'
11+
default: false
512

613
jobs:
714
publish-to-github:
@@ -18,5 +25,6 @@ jobs:
1825
uses: actions/configure-pages@v5
1926

2027
- name: Deploy Pages
28+
if: github.event.inputs.publish_site
2129
id: deployment
22-
uses: actions/deploy-pages@v4
30+
uses: actions/deploy-pages@v4

.github/workflows/publish-to-netlify.yml renamed to .github/workflows/publish-site-to-netlify.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
name: Publish to Netlify
1+
name: Publish Site to Netlify
22

33
on:
4+
push:
5+
pull_request:
46
workflow_dispatch:
7+
inputs:
8+
publish_site:
9+
type: boolean
10+
description: 'Publish To Netlify'
11+
default: false
512

613
jobs:
714
publish-to-netlify:
@@ -29,6 +36,7 @@ jobs:
2936
restore-keys: ${{ runner.os }}-netlify-cli
3037

3138
- name: Deploy to Netlify
39+
if: github.event.inputs.publish_site
3240
uses: South-Paw/action-netlify-cli@v2
3341
id: netlify
3442
with:
@@ -38,6 +46,7 @@ jobs:
3846
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
3947

4048
- name: Get Netlify Preview URL
49+
if: github.event.inputs.publish_site
4150
id: netlify-status
4251
run: |
4352
echo "NETLIFY_DEPLOY_URL=${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)