Skip to content

Commit 649aa24

Browse files
committed
Add branch input and example steps for non-github hosts
1 parent 0a92b7d commit 649aa24

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/reusable-github-pages.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: false
99
type: string
1010
default: ""
11+
branch:
12+
required: false
13+
type: string
14+
default: "gh-pages"
1115
set-default:
1216
required: false
1317
type: boolean
@@ -58,9 +62,21 @@ jobs:
5862
5963
- name: Build and deploy static pages
6064
run: |
61-
mike deploy ${{ inputs.site-version }} ${{ inputs.version-alias }} --update-aliases --push
65+
mike deploy ${{ inputs.site-version }} ${{ inputs.version-alias }} --update-aliases --push --branch ${{ inputs.branch }}
6266
6367
- name: Set default site version
6468
if: ${{ inputs.site-default }}
6569
run: |
66-
mike set-default ${{ inputs.set-version }} --push
70+
mike set-default ${{ inputs.set-version }} --push --branch ${{ inputs.branch }}
71+
72+
# `mike` is specifically built to be used together with GitHub pages.
73+
# To upload the website to another service (i.e. AWS S3) uncomment
74+
# the following step to download the rendered HTML documentation to ./site directory.
75+
# You'll need to implement the upload steps for your provider.
76+
77+
# - name: Download artifact to ./site
78+
# run: |
79+
# rm -rf ./site
80+
# git archive -o site.tar ${{ inputs.branch }}
81+
# mkdir -p ./site
82+
# tar xf site.tar -C ./site

0 commit comments

Comments
 (0)