Merge pull request #83 from maltezfaria/narrow-band #144
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "src/**" | |
| - ".github/workflows/Docs.yml" | |
| - "*.toml" | |
| tags: ["*"] | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "src/**" | |
| - "*.toml" | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| concurrency: | |
| # Skip intermediate builds: always. | |
| # Cancel intermediate builds: only if it is a pull request build. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| docs: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: "1" | |
| - name: Use Julia cache | |
| uses: julia-actions/cache@v3 | |
| - name: Instantiate environment with development version of the package | |
| run: | | |
| julia --project=docs -e ' | |
| using Pkg | |
| Pkg.develop(PackageSpec(path=pwd())) | |
| Pkg.instantiate()' | |
| - name: Run doctest | |
| run: | | |
| julia --project=docs -e ' | |
| using Documenter: DocMeta, doctest | |
| using LevelSetMethods | |
| DocMeta.setdocmeta!(LevelSetMethods, :DocTestSetup, :(using LevelSetMethods); recursive=true) | |
| doctest(LevelSetMethods)' | |
| - name: Generate and deploy documentation (without coverage) | |
| if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') | |
| run: DISPLAY=:1 xvfb-run -s '-screen 1 1024x768x24' julia --project=docs docs/make.jl | |
| env: | |
| JULIA_PKG_SERVER: "" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
| - name: Generate and deploy documentation (with coverage) | |
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
| run: DISPLAY=:1 xvfb-run -s '-screen 1 1024x768x24' julia --project=docs --code-coverage=user docs/make.jl | |
| env: | |
| JULIA_PKG_SERVER: "" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
| - name: Process coverage | |
| if: github.ref == 'refs/heads/main' | |
| uses: julia-actions/julia-processcoverage@v1 | |
| - name: Upload coverage to Codecov | |
| if: github.ref == 'refs/heads/main' | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info |