Skip to content

Build site from source. (#472) #41

Build site from source. (#472)

Build site from source. (#472) #41

Workflow file for this run

# Push the `website/public` directory to the `gh-pages` branch.
#
# The 'main' branch of this repository is the source of truth for the website content.
# The gh-pages branch simply exists as a mirror of `website/public` directory
# of the `main` branch to serve that site content via GitHub pages.
# The `gh-pages` branch should never be edited directly, and should always be
# an exact mirror of the `website/public` directory on the `main` branch.
# This workflow performs that mirror, which then triggers another action
# on the `gh-pages` branch that deploys the site content to GitHub Pages.
name: Push website/public directory to gh-pages branch
# Run whenever the `website/public` folder in the `main` branch changes.
on:
push:
branches:
- 'main'
paths:
- 'website/public/**'
# Allow manual runs from the Actions tab
workflow_dispatch:
jobs:
push-gh-pages:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@v4
# Push the `website/public` directory to `gh-pages` via `git subtree push`
- name: Push to gh-pages branch
run: git push origin `git subtree split --prefix website/public main`:gh-pages --force