Skip to content

Commit

Permalink
add project option to build from subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub authored Dec 2, 2022
1 parent 80c0bdc commit 4d7e2bf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: 'Whether or not to install the package with `Pkg.develop` into the `docs` environment'
default: true
required: false
project:
description: 'Directory that contains the folder `docs` to deploy from'
default: '.'
required: false

runs:
using: 'composite'
Expand All @@ -25,7 +29,9 @@ runs:
Pkg.activate("docs-logger-env"; shared=true)
Pkg.add(Pkg.PackageSpec(name="GitHubActions", version="0.1"))
shell: julia --color=yes {0}
- run: |
working-directory: ${{inputs.project}}
- 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()' )
Expand All @@ -36,8 +42,10 @@ runs:
# Run the Julia command
"${julia_cmd[@]}"
shell: bash
working-directory: ${{inputs.project}}
if: ${{ inputs.install-package }}
- run: |
- name: Build the documentation
run: |
# The Julia command that will be executed
julia_cmd=( julia --color=yes --project=docs/ -e '
@eval Module() begin
Expand All @@ -55,3 +63,4 @@ runs:
# Run the Julia command
"${julia_cmd[@]}"
shell: bash
working-directory: ${{inputs.project}}

0 comments on commit 4d7e2bf

Please sign in to comment.