|
55 | 55 | - uses: julia-actions/setup-julia@v2 |
56 | 56 | with: |
57 | 57 | version: '1' |
58 | | - - run: | |
59 | | - julia -e ' |
| 58 | + - shell: julia --color=yes {0} |
| 59 | + run: | |
60 | 60 | function set_environment_variable(name::AbstractString, value::AbstractString) |
61 | 61 | github_env = ENV["GITHUB_ENV"] |
62 | 62 | touch(github_env) |
@@ -84,35 +84,39 @@ jobs: |
84 | 84 | if build_docs |
85 | 85 | @info("We will build the docs") |
86 | 86 | set_environment_variable("BUILD_DOCS", "true") |
87 | | - else |
| 87 | + else |
88 | 88 | @info("We will NOT build the docs") |
89 | 89 | set_environment_variable("BUILD_DOCS", "false") |
90 | | - end' |
91 | | - - run: | |
92 | | - julia --project=docs -e ' |
| 90 | + end |
| 91 | + - name: Instantiate docs environment |
| 92 | + shell: julia --color=yes --project=docs {0} |
| 93 | + run: | |
93 | 94 | if ENV["BUILD_DOCS"] == "true" |
94 | 95 | using Pkg |
95 | 96 | Pkg.develop(PackageSpec(path=pwd())) |
96 | 97 | Pkg.instantiate() |
97 | | - end' |
98 | | - - run: | |
99 | | - julia --project=docs -e ' |
| 98 | + end |
| 99 | + - name: Run doctests |
| 100 | + shell: julia --color=yes --project=docs {0} |
| 101 | + run: | |
100 | 102 | if ENV["BUILD_DOCS"] == "true" |
101 | 103 | using Documenter: doctest |
102 | 104 | using ScientificTypes |
103 | 105 | @info "attempting to run the doctests" |
104 | 106 | doctest(ScientificTypes) |
105 | 107 | else |
106 | 108 | @info "skipping the doctests" |
107 | | - end' |
108 | | - - run: julia --project=docs -e ' |
| 109 | + end |
| 110 | + - name: Build documentation |
| 111 | + shell: julia --color=yes --project=docs {0} |
| 112 | + run: | |
109 | 113 | if ENV["BUILD_DOCS"] == "true" |
110 | 114 | @info "attempting to build the docs" |
111 | 115 | run(`julia --project=docs docs/make.jl`) |
112 | 116 | @info "successfully built the docs" |
113 | 117 | else |
114 | 118 | @info "skipping the docs build" |
115 | | - end' |
| 119 | + end |
116 | 120 | env: |
117 | 121 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
118 | 122 | DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments