Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update, simplify, and better name and file name #464

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name # if this is a pull request build AND the pull request is NOT made from a fork
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 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
lucaferranti marked this conversation as resolved.
Show resolved Hide resolved
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 protected]"
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 }}
Loading