From d05557fb0f847a6ce5d029075bdeff73f7cd86b1 Mon Sep 17 00:00:00 2001 From: bmxam Date: Fri, 5 Feb 2021 22:00:27 +0100 Subject: [PATCH] github actions and PetscWrap compat --- .github/workflows/DocPreviewCleanup.yml | 28 +++++++++++++++++++++++++ .github/workflows/Documentation.yml | 24 +++++++++++++++++++++ .github/workflows/TagBot.yml | 15 +++++++++++++ Project.toml | 5 +++++ docs/Project.toml | 6 +++++- 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/DocPreviewCleanup.yml create mode 100644 .github/workflows/Documentation.yml create mode 100644 .github/workflows/TagBot.yml diff --git a/.github/workflows/DocPreviewCleanup.yml b/.github/workflows/DocPreviewCleanup.yml new file mode 100644 index 0000000..f3d42b6 --- /dev/null +++ b/.github/workflows/DocPreviewCleanup.yml @@ -0,0 +1,28 @@ +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@v2 + with: + ref: gh-pages + + - name: Delete preview and history + run: | + 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}) + env: + PRNUM: ${{ github.event.number }} + + - name: Push changes + run: | + git push --force origin gh-pages-new:gh-pages \ No newline at end of file diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..cf0a23d --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,24 @@ +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: '1.4' + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key + run: julia --project=docs/ docs/make.jl \ No newline at end of file diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..623860f --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,15 @@ +name: TagBot +on: + 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 }} \ No newline at end of file diff --git a/Project.toml b/Project.toml index 57bb2d2..fa5e7f1 100644 --- a/Project.toml +++ b/Project.toml @@ -7,3 +7,8 @@ version = "0.1.0" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" PetscWrap = "5be22e1c-01b5-4697-96eb-ef9ccdc854b8" + +[compat] +MPI = "0.16.1" +julia = "1.5" +PetscWrap = "0.1.1" \ No newline at end of file diff --git a/docs/Project.toml b/docs/Project.toml index d3425fa..4b56aaf 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,8 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" SlepcWrap = "c3679e3b-785e-4ccc-b734-b7685cbb935e" -Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" \ No newline at end of file +Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" + +[compat] +Documenter = "0.26" +Literate = "2.7" \ No newline at end of file