-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy doc | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
doc-version: | ||
description: "version of the library for which we are deploying the doc. If empty, then it is main branch doc." | ||
required: FALSE | ||
default: "" | ||
type: string | ||
doc-clean: | ||
description: "Whether the previous doc should be cleaned. (Always ignore subfolders in version/)" | ||
required: FALSE | ||
default: "true" | ||
type: string | ||
doc-artifact-name: | ||
description: "Name of the artifact containing the built doc" | ||
required: false | ||
default: "doc" | ||
type: string | ||
doc-path: | ||
description: "Path where to extract the built doc" | ||
required: false | ||
default: "docs/.vuepress/dist" | ||
type: string | ||
binder-env-fullref: | ||
description: "Full ref of the binder env to build. The build is triggered only if not empty." | ||
required: false | ||
default: "" | ||
type: string | ||
jobs: | ||
deploy-doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.doc-artifact-name }} | ||
path: ${{ inputs.doc-path }} | ||
- name: set doc-version-path | ||
id: set-doc-version-path | ||
run: | | ||
doc_version=${{ inputs.doc-version }} | ||
if [ -z "${doc_version}" ]; then | ||
doc_version_path="/" | ||
else | ||
doc_version_path="/version/${doc_version}/" | ||
fi | ||
echo "doc_version_path=${doc_version_path}" >> $GITHUB_OUTPUT | ||
- name: Deploy documentation in a version subfolder on GH pages | ||
run: | | ||
echo target_folder: ${{ steps.set-doc-version-path.outputs.doc_version_path }} # The folder the action should deploy to. |