Skip to content

update workflow files #72

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

Merged
merged 1 commit into from
May 7, 2025
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
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/pr-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Deploy a PR preview to the gh-pages branch"

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
branches:
- 'main'

concurrency: preview-${{ github.ref }}

jobs:
deploy-pr-preview:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pull-requests: write

steps:
- name: Checkout the PR version of the website repository
uses: actions/checkout@v4

- name: Setup the environment
if: github.event.action != 'closed' # Skip the build if the PR has been closed; just run the clean up steps
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yaml
init-shell: bash
cache-environment: true
post-cleanup: none

- name: Build the PR version of the website
if: github.event.action != 'closed' # Skip the build if the PR has been closed; just run the clean up steps
run: quarto render
shell: bash -el {0} # Required to see the mamba init env

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./_site/
40 changes: 40 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Render and Publish"

on:
push:
branches:
- main
workflow_dispatch:

# you need these permissions to publish to GitHub pages
permissions:
contents: write
pages: write

jobs:
build-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4 # Checkout the repo to find files, such as the env

- name: Setup the environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yaml
init-shell: bash
cache-environment: true
post-cleanup: none

- name: Build the website
run: quarto render
shell: bash -el {0} # Required to see the mamba init env

# Push the website to the gh-pages branch
- name: Push the PR version of the website to gh-pages branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
keep_files: true
destination_dir: .