From 1d77e43f949a96a689c569005c9618715c216169 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Wed, 23 Oct 2024 16:22:20 +0200 Subject: [PATCH] Move Pkg.instantiate to a separate step This should make it easier to use the action when you have a commited manifest (as you should :^) ) --- action.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 142e3e7..7c4f726 100644 --- a/action.yml +++ b/action.yml @@ -33,7 +33,7 @@ runs: - name: Install the current package into the `docs` environment run: | # The Julia command that will be executed - julia_cmd=( julia --color=yes --code-coverage --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' ) + julia_cmd=( julia --color=yes --code-coverage --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' ) # Add the prefix in front of the command if there is one prefix=( ${{ inputs.prefix }} ) @@ -44,6 +44,19 @@ runs: shell: bash working-directory: ${{inputs.project}} if: ${{ inputs.install-package == 'true'}} + - name: Instantiate the `docs` environment + run: | + # The Julia command that will be executed + julia_cmd=( julia --color=yes --code-coverage --project=docs/ -e 'using Pkg; Pkg.instantiate()' ) + + # Add the prefix in front of the command if there is one + prefix=( ${{ inputs.prefix }} ) + [[ ${#prefix[@]} -gt 0 ]] && julia_cmd=( "${prefix[@]}" "${julia_cmd[@]}" ) + + # Run the Julia command + "${julia_cmd[@]}" + shell: bash + working-directory: ${{inputs.project}} - name: Build the documentation run: | # The Julia command that will be executed