Skip to content

Commit 525f017

Browse files
committed
provide workflow dispatch button
1 parent 579e8d7 commit 525f017

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,33 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [main]
6-
6+
workflow_dispatch:
7+
inputs:
8+
unpackerr_branch:
9+
description: "The branch to read unpackerr's definitions.yml from"
10+
required: true
11+
default: "main"
12+
branch:
13+
description: "The local branch to deploy from"
14+
required: true
15+
default: "main"
716
jobs:
817
deploy:
918
name: Deploy to GitHub Pages
1019
runs-on: ubuntu-latest
1120
steps:
1221
- uses: actions/checkout@v6
22+
with:
23+
ref: ${{ inputs.branch || 'main' }}
1324
- uses: actions/setup-node@v6
1425
with:
15-
node-version: 24.x
26+
node-version: latest
1627
cache: yarn
1728
- name: Install Dependencies
1829
run: yarn install --frozen-lockfile
1930
- name: Build website
31+
env:
32+
UNPACKERR_BRANCH: ${{ inputs.unpackerr_branch || 'main' }}
2033
run: yarn build
2134

2235
# Popular action to deploy to GitHub Pages:
@@ -27,4 +40,3 @@ jobs:
2740
github_token: ${{ secrets.GITHUB_TOKEN }}
2841
# Build output to publish to the `gh-pages` branch:
2942
publish_dir: build
30-

generate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# The beginning: https://github.com/Unpackerr/unpackerr/pull/459
22
# The generator: https://github.com/Unpackerr/unpackerr/tree/main/init/config
33

4+
UNPACKERR_BRANCH=${UNPACKERR_BRANCH:-main}
5+
46
# We do this because go cache will download an older version.
57
go env -w 'GOPRIVATE=github.com/Unpackerr/*'
68

79
# Run the config generator directly from github.
8-
go run github.com/Unpackerr/unpackerr/init/config@main --type docusaurus --output docs/install/generated
10+
go run github.com/Unpackerr/unpackerr/init/config@${UNPACKERR_BRANCH} --type docusaurus --output docs/install/generated

0 commit comments

Comments
 (0)