From 8310490b668608cf82a889cde05d708852512ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 1 Jan 2024 21:17:11 +0100 Subject: [PATCH] Update to Documenter.jl v1 (#364) --- .github/workflows/Documentation.yml | 43 +++++++++++++++++++++++++++ .github/workflows/PreviewsCleanup.yml | 26 ++++++++++++++++ .github/workflows/ci.yml | 25 +++++++--------- docs/Project.toml | 2 +- docs/src/index.md | 9 ++++++ 5 files changed, 89 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/Documentation.yml create mode 100644 .github/workflows/PreviewsCleanup.yml diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 00000000..ede1c7fd --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,43 @@ +name: Documentation + +on: + push: + branches: "master" + tags: ["*"] + paths: + - '.github/workflows/Documentation.yml' + - '*.toml' + - 'docs/**' + - 'src/**' + pull_request: + paths: + - '.github/workflows/Documentation.yml' + - '*.toml' + - 'docs/**' + - 'src/**' + release: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + BINARYBUILDER_AUTOMATIC_APPLE: true + +jobs: + Documentation: + timeout-minutes: 30 + runs-on: ubuntu-latest + env: + JULIA_PKG_SERVER: "" + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/cache@v1 + - uses: julia-actions/setup-julia@v1 + with: + version: "1.7" + - uses: julia-actions/julia-docdeploy@releases/v1 + env: + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/PreviewsCleanup.yml b/.github/workflows/PreviewsCleanup.yml new file mode 100644 index 00000000..94b9f70a --- /dev/null +++ b/.github/workflows/PreviewsCleanup.yml @@ -0,0 +1,26 @@ +name: Doc Preview Cleanup + +on: + pull_request: + types: [closed] + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "previews/PR$PRNUM" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "previews/PR$PRNUM" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + PRNUM: ${{ github.event.number }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adac94a8..86bba3dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,17 @@ on: push: branches: "master" tags: ["*"] + paths: + - '.github/workflows/ci.yml' + - '*.toml' + - 'src/**' + - 'test/**' pull_request: + paths: + - '.github/workflows/ci.yml' + - '*.toml' + - 'src/**' + - 'test/**' release: concurrency: @@ -94,18 +104,3 @@ jobs: continue-on-error: true - uses: julia-actions/julia-uploadcoveralls@v1.0 continue-on-error: true - - Documentation: - timeout-minutes: 30 - runs-on: ubuntu-latest - env: - JULIA_PKG_SERVER: "" - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/cache@v1 - - uses: julia-actions/setup-julia@latest - with: - version: "1.7" - - uses: julia-actions/julia-docdeploy@releases/v1 - env: - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/docs/Project.toml b/docs/Project.toml index f2a273e5..1814eb33 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "~0.24" +Documenter = "1" diff --git a/docs/src/index.md b/docs/src/index.md index be96d017..49ad63f5 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -8,13 +8,22 @@ This is the reference documentation of ``` ## Types + ```@autodocs Modules = [BinaryBuilderBase] Order = [:type] ``` ## Functions + ```@autodocs Modules = [BinaryBuilderBase] Order = [:function] ``` + +## Constants + +```@autodocs +Modules = [BinaryBuilderBase] +Order = [:constant] +```