Skip to content

Commit

Permalink
add project option to build from subdirectory (#27)
Browse files Browse the repository at this point in the history
* add `project` option to build from subdirectory

addresses #26

* fix merge update

---------

Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
  • Loading branch information
simeonschaub and IanButterworth authored Jul 18, 2024
1 parent 6880aac commit 81a223c
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 == 'true'}}
- 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 81a223c

Please sign in to comment.