diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5bb3a51 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,41 @@ +name: Docs +on: + workflow_dispatch: + push: + paths: # rebuild the docs when the version changes or the docs change + - docs/* + - Project.toml + pull_request: # run when pull requests are made + paths: + - docs/* + - Project.toml +jobs: + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: '1.12' + - name: Install dependencies + run: | + sudo apt install libxt6 libxrender1 libxext6 libqt5widgets5 + - name: Instantiate + env: + PYTHON: "" + run: | + julia --project=docs -e ' + using Pkg + Pkg.instantiate() + Pkg.resolve() + Pkg.develop(PackageSpec(path=pwd()))' + - name: Build and deploy + env: + PYTHON: "" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: julia --project=docs docs/make.jl + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 \ No newline at end of file diff --git a/docs/Project.toml b/docs/Project.toml index 6f33109..cb37b9a 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -3,5 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" PolyHarmonicTrigTransforms = "c853eca7-4467-4dac-871a-88cef1644acc" [compat] -Documenter = "1.17" -PolyHarmonicTrigTransforms = "1.0" \ No newline at end of file +Documenter = "1.17" \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index b905424..89b36a7 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,6 +3,7 @@ using PolyHarmonicTrigTransforms makedocs( modules = [PolyHarmonicTrigTransforms], + repo=Documenter.Remotes.GitHub("UCD4IDS", "PolyHarmonicTrigTransforms.jl"), sitename = "PolyHarmonicTrigTransforms.jl", pages = [ "Home" => "index.md", @@ -15,5 +16,7 @@ makedocs( ) deploydocs( - repo = "github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl.git" + repo = "github.com/UCD4IDS/PolyHarmonicTrigTransforms.jl.git", + devbranch="master", + push_preview=true ) \ No newline at end of file