Skip to content

Commit

Permalink
Test deploy-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nhuet committed May 3, 2024
1 parent fca4888 commit 76c4090
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,12 @@ jobs:
if: always()
steps:
- run: echo yo ${{ needs.only-on-master.outputs.notebooks-branch }}

deploy-doc:
uses: ./.github/workflows/deploy-doc.yml
with:
doc-version: 0.13.0

deploy-doc-2:
uses: ./.github/workflows/deploy-doc.yml

54 changes: 54 additions & 0 deletions .github/workflows/deploy-doc.yml
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.

0 comments on commit 76c4090

Please sign in to comment.