diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cfaa0ca..8820c972 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ name: Build/deploy website env: - ZOLA_VERSION: "0.17.2" + ZOLA_VERSION: "0.18.0" MAIN_BRANCH: "main" TARGET_BRANCH: "gh-pages" CNAME: "nordic-rse.org" diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/link-to-preview.yml similarity index 79% rename from .github/workflows/pr_comment.yml rename to .github/workflows/link-to-preview.yml index 6c69c00f..dfa3786f 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/link-to-preview.yml @@ -1,9 +1,9 @@ -name: PR Comment # Write a comment in the PR with a link to the preview of the given website +name: Link to preview in PR conversation on: pull_request: types: [opened, reopened] jobs: - pr_comment: + link-to-preview: runs-on: ubuntu-latest steps: - name: Create PR comment @@ -11,4 +11,4 @@ jobs: uses: thollander/actions-comment-pull-request@71efef56b184328c7ef1f213577c3a90edaa4aff with: message: 'Once the build has completed, you can preview your PR at this URL: https://${{ github.event.pull_request.base.repo.name }}/previews/PR${{ github.event.number }}/' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/preview_cleanup.yml b/.github/workflows/remove-preview-after-merge.yml similarity index 58% rename from .github/workflows/preview_cleanup.yml rename to .github/workflows/remove-preview-after-merge.yml index 0f9692a6..64c7541c 100644 --- a/.github/workflows/preview_cleanup.yml +++ b/.github/workflows/remove-preview-after-merge.yml @@ -1,27 +1,25 @@ # from https://github.com/CliMA/ClimaTimeSteppers.jl -name: Site Preview Cleanup +name: Remove preview once PR is merged or closed on: pull_request: types: [closed] jobs: - doc-preview-cleanup: + remove-preview-after-merge: runs-on: ubuntu-latest steps: - name: Checkout gh-pages branch - uses: actions/checkout@v2 + 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" + if [ -d "previews/PR${{ github.event.number }}" ]; then + git config user.name "GH workflow" + git config user.email "email@example.org" + git rm -rf "previews/PR${{ github.event.number }}" 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 }} \ No newline at end of file