From bac3bc384d0cd56eadd8c8e6e6296c8cd7f609e0 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:50:17 +0100 Subject: [PATCH 1/7] Update CompatHelper: use DOCUMENTER_KEY --- .github/workflows/CompatHelper.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index bcdb51a..688c5c4 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,16 +1,25 @@ name: CompatHelper on: schedule: - - cron: '00 00 * * *' + - cron: 0 0 * * * workflow_dispatch: jobs: CompatHelper: runs-on: ubuntu-latest steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional - run: julia -e 'using CompatHelper; CompatHelper.main()' + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} From bd15d69185440276e4302a70c2a499050e130840 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:51:26 +0100 Subject: [PATCH 2/7] Update TagBot.yml --- .github/workflows/TagBot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index d77d3a0..ed607f7 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -2,10 +2,16 @@ name: TagBot on: schedule: - cron: 0 * * * * + issue_comment: + types: + - created + workflow_dispatch: jobs: TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' runs-on: ubuntu-latest steps: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} From 9c6f9395fb3409a1706e105e8f4b42585a5aec74 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:54:27 +0100 Subject: [PATCH 3/7] Update CI: cancel intermediate builds + update codecov --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e211b2..dbca8a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI + on: pull_request: branches: @@ -7,6 +8,13 @@ on: branches: - master tags: '*' + +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: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} @@ -42,6 +50,8 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + continue-on-error: true + - uses: codecov/codecov-action@v2 + continue-on-error: true with: file: lcov.info From f91692530ba533c24912dec4083a853687d22dec Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:55:40 +0100 Subject: [PATCH 4/7] Update docs action: cancel builds + use Julia 1 --- .github/workflows/docs.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2763219..a42659c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,10 +1,18 @@ name: Documentation + on: push: branches: - master tags: '*' pull_request: + +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: build: runs-on: ubuntu-latest @@ -12,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.5' + version: '1' - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy From 61a3592c662a0f4c18ea18440e6c5d370017bbc6 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:56:28 +0100 Subject: [PATCH 5/7] Update downstream action: cancel builds --- .github/workflows/downstream.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 7af4f84..b4e2f48 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -1,10 +1,17 @@ name: IntegrationTest + on: push: branches: [master] tags: [v*] pull_request: +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: test: name: ${{ matrix.package.repo }}/${{ matrix.package.group }} From bcf9b55e0b1b0b5bd16ce706900519f069c42150 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:57:16 +0100 Subject: [PATCH 6/7] Preview documentation --- docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index a2aee17..23f89bd 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -9,4 +9,4 @@ makedocs(modules=[DiffRules], ), ) -deploydocs(repo = "github.com/JuliaDiff/DiffRules.jl") +deploydocs(; repo="github.com/JuliaDiff/DiffRules.jl", push_preview=true) From f820e6df69e6b90e295204a43c14923a7749f6b6 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 3 Nov 2021 11:58:41 +0100 Subject: [PATCH 7/7] Cleanup preview of documentation --- .github/workflows/DocsPreviewCleanup.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/DocsPreviewCleanup.yml diff --git a/.github/workflows/DocsPreviewCleanup.yml b/.github/workflows/DocsPreviewCleanup.yml new file mode 100644 index 0000000..6420be9 --- /dev/null +++ b/.github/workflows/DocsPreviewCleanup.yml @@ -0,0 +1,26 @@ +name: Docs Preview Cleanup + +on: + pull_request: + types: [closed] + +jobs: + docs-preview-cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v2 + 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 }}