diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e78cd7..c68d161 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,23 +1,21 @@ -# SPDX-FileCopyrightText: 2024 Friedrich von Never +# SPDX-FileCopyrightText: 2024-2026 TruePath contributors # # SPDX-License-Identifier: MIT +# This file is auto-generated. name: Docs on: push: branches: - - main - workflow_dispatch: - + - main + workflow_dispatch: +concurrency: + group: pages + cancel-in-progress: false permissions: actions: read - pages: write id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - + pages: write jobs: publish-docs: environment: @@ -25,20 +23,18 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-24.04 steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Dotnet Setup - uses: actions/setup-dotnet@v5 - with: - dotnet-version: 8.x - - - run: dotnet tool restore - - run: dotnet docfx docs/docfx.json - - - name: Upload artifact - uses: actions/upload-pages-artifact@v4 - with: - path: 'docs/_site' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Checkout + uses: actions/checkout@v6 + - name: Set up .NET SDK + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 8.x + - run: dotnet tool restore + - run: dotnet docfx docs/docfx.json + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + path: docs/_site + - id: deployment + name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b21ba0..7f7b370 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,14 @@ +# SPDX-FileCopyrightText: 2024-2026 TruePath contributors +# +# SPDX-License-Identifier: MIT + # This file is auto-generated. name: Main on: push: branches: - main + - renovate/** pull_request: branches: - main @@ -34,11 +39,11 @@ jobs: steps: - uses: actions/checkout@v6 - name: Set up .NET SDK - uses: actions/setup-dotnet@v5 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: NuGet cache - uses: actions/cache@v5 + uses: actions/cache@v4 with: key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.csproj') }} path: ${{ env.NUGET_PACKAGES }} diff --git a/.github/workflows/main.yml.license b/.github/workflows/main.yml.license deleted file mode 100644 index 0943795..0000000 --- a/.github/workflows/main.yml.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 TruePath contributors - -SPDX-License-Identifier: MIT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c11fc25..7c747ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,14 @@ +# SPDX-FileCopyrightText: 2024-2026 TruePath contributors +# +# SPDX-License-Identifier: MIT + # This file is auto-generated. name: Release on: push: branches: - main + - renovate/** tags: - v* pull_request: diff --git a/.github/workflows/release.yml.license b/.github/workflows/release.yml.license deleted file mode 100644 index dc04a80..0000000 --- a/.github/workflows/release.yml.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024-2025 Friedrich von Never - -SPDX-License-Identifier: MIT diff --git a/TruePath.sln b/TruePath.sln index dd11f62..01b534b 100644 --- a/TruePath.sln +++ b/TruePath.sln @@ -34,9 +34,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{55C1E2A5-1630-4C22-A403-65DA2B1B969D}" ProjectSection(SolutionItems) = preProject .github\workflows\main.yml = .github\workflows\main.yml - .github\workflows\main.yml.license = .github\workflows\main.yml.license .github\workflows\release.yml = .github\workflows\release.yml - .github\workflows\release.yml.license = .github\workflows\release.yml.license .github\workflows\docs.yml = .github\workflows\docs.yml EndProjectSection EndProject diff --git a/renovate.json b/renovate.json index 02d9d3e..6bb774a 100644 --- a/renovate.json +++ b/renovate.json @@ -4,6 +4,7 @@ "config:recommended" ], "automerge": true, + "automergeType": "branch", "customManagers": [ { "description": "Update the F# script dependencies.", diff --git a/renovate.json.license b/renovate.json.license index cd1d78a..40ac802 100644 --- a/renovate.json.license +++ b/renovate.json.license @@ -1,3 +1,3 @@ -SPDX-FileCopyrightText: 2025 Friedrich von Never +SPDX-FileCopyrightText: 2025-2026 Friedrich von Never SPDX-License-Identifier: MIT diff --git a/scripts/github-actions.fsx b/scripts/github-actions.fsx index d8a6118..14d6b36 100644 --- a/scripts/github-actions.fsx +++ b/scripts/github-actions.fsx @@ -1,6 +1,9 @@ -// SPDX-FileCopyrightText: 2024-2025 TruePath contributors -// -// SPDX-License-Identifier: MIT +let licenseHeader = """ +# SPDX-FileCopyrightText: 2024-2026 TruePath contributors +# +# SPDX-License-Identifier: MIT + +# This file is auto-generated.""".Trim() #r "nuget: Generaptor.Library, 1.9.0" @@ -22,11 +25,17 @@ let images = [ let workflows = [ let mainTriggers = [ onPushTo mainBranch + onPushTo "renovate/**" onPullRequestTo mainBranch onSchedule(day = DayOfWeek.Saturday) onWorkflowDispatch ] + let workflow name actions = workflow name [ + header licenseHeader + yield! actions + ] + workflow "main" [ name "Main" yield! mainTriggers @@ -122,6 +131,52 @@ let workflows = [ ] ] ] + + workflow "docs" [ + name "Docs" + onPushTo "main" + onWorkflowDispatch + workflowPermission(PermissionKind.Actions, AccessKind.Read) + workflowPermission(PermissionKind.Pages, AccessKind.Write) + workflowPermission(PermissionKind.IdToken, AccessKind.Write) + workflowConcurrency( + group = "pages", + cancelInProgress = false + ) + job "publish-docs" [ + environment(name = "github-pages", url = "${{ steps.deployment.outputs.page_url }}") + runsOn "ubuntu-24.04" + step( + name = "Checkout", + usesSpec = Auto "actions/checkout" + ) + step( + name = "Set up .NET SDK", + usesSpec = Auto "actions/setup-dotnet", + options = Map.ofList [ + "dotnet-version", "8.x" + ] + ) + step( + run = "dotnet tool restore" + ) + step( + run = "dotnet docfx docs/docfx.json" + ) + step( + name = "Upload artifact", + usesSpec = Auto "actions/upload-pages-artifact", + options = Map.ofList [ + "path", "docs/_site" + ] + ) + step( + name = "Deploy to GitHub Pages", + id = "deployment", + usesSpec = Auto "actions/deploy-pages" + ) + ] + ] ] -EntryPoint.Process fsi.CommandLineArgs workflows +exit <| EntryPoint.Process fsi.CommandLineArgs workflows