This is the repository where the UW Seafood Globalization Lab’s Manual is edited, built, and deployed from. It is a Quarto static website.
The website is automatically published from the gh-pages branch and served via GitHub Pages.
We follow a lightweight GitFlow-style workflow to keep the history clean and contributions organized:
-
🌳
mainbranch – long-lived, production branch- Represents the current public version of the Lab Manual.
- Every change merged into
maintriggers a site rebuild and redeploy.
-
✨ Feature branches – short-lived, task-specific branches
- Created from remote
mainbranch - Named after the GitHub Issue or task and incorporate contributors’ initials (e.g.,
feature-am-issue-3-contributing-fileorfeature-jp-code-of-conduct).- Find or create a specific issue to work on here lab-manual issues
- Used to make and test changes locally before merging into
main. - Rebased frequently on
mainto maintain a linear and up-to-date history.
- Created from remote
-
🆕 Integrate Changes
- The feature branch is rebased and merged into
main. - The feature branch is then closed/deleted.
- The feature branch is rebased and merged into
- Clone the repository
git clone git@github.com:Seafood-Globalization-Lab/lab-manual.git
cd lab-manual- Create a short-lived feature branch from main
git checkout main
git pull origin main
git checkout -b feature-update-methods-section- Make edits locally and preview entire website
quarto previewNote
If you have created a new page for the website, make sure it is added/referenced in the lab-manual/_quarto.yml file. This is the configuration file that provides the skeleton for the website. Add your new page under contents:. Indenting is very strict in .yml files, follow the existing formatting.
- Stage and commit your changes
git add .
git commit -m "Add new section on seafood sourcing methods"- Rebase to keep your branch up to date with main
git fetch origin
git rebase origin/mainImportant
There are two methods for integrating your changes into main:
- (6a) A Pull Request (PR) is recommended for collaboration and review. If you have not run your changes by Jessica then a PR is recommended. Request a reviewer for your changes and notify that person of the open PR.
- (6b - 8) A PR is not required for deployment. Any direct push to
mainwill automatically trigger the GitHub Action and redeploy the site.
6a. Open a Pull Request on GitHub
- Click the "Pull Request" tab on the lab-maunal repo page.
- Set the "base" to 'main' and "compare" to 'your-feature-branch`
- Click "Create Pull Request"
- Add new title and complete the PR template inside of the description box.
- Assign a reviewer in the right hand column.
- Add labels that apply to your changes.
- Click "Create Pull Request"
- Notify the reviewer you suggested (probably Jessica or current data scientist) of the existence of the PR and you are asking for their review of your changes.
OR
6b. Merge your feature branch into main with a clear message
git checkout main
git pull origin main
git merge --no-ff feature-update-methods-section -m "Merge branch 'feature-update-methods-section' into main"Tip
- The
--no-ffflag ensures the merge is recorded as a distinct commit, preserving the context of your feature branch. - The
-mflag paried with"your message"adds a message to the merge commit helping keep track of feature integration.
- Push updated main to trigger the GitHub Action
git push origin main- Delete the feature branch locally & on the remote
git branch -d feature-update-methods-section
git push origin --delete feature-update-methods-sectionImportant
Once main is updated on GitHub, a GitHub Action is automatically triggered to publish the website. See below (How to Deploy the Website) for more details.
The website is published from the gh-pages branch using a GitHub Actions workflow that automates the Quarto build and deployment process.
When changes are pushed or merged into main, the GitHub Action defined in .github/workflows/publish.yml automatically builds and deploys the site on a GitHub-hosted runner (a temporary virtual
machine created for each workflow run). This process mirrors what would happen if you ran quarto publish gh-pages locally, but everything occurs remotely within GitHub’s infrastructure.
Here’s what happens step by step:
- Start a GitHub-hosted runner – GitHub spins up a clean virtual machine (Ubuntu environment) to execute the workflow.
- Check out the repository on the
mainbranch using theactions/checkout@v4step. - Install Quarto with the
quarto-dev/quarto-actions/setup@v2action. - Render the site within the runner by running:
quarto render. This builds the HTML output in the runner’s environment. - Publish the rendered output to the
gh-pagesbranch using:quarto publish gh-pages. This command executes on the runner, authenticating via GitHub’s provided token, and pushes the built site to your repository. - Deploy to GitHub Pages, which serves the contents of the
gh-pagesbranch at:
👉 https://seafood-globalization-lab.github.io/lab-manual/
To verify that the site was successfully deployed:
- Go to the Actions tab in the repository.
- Open the latest “Publish to GitHub Pages” workflow run.
- Confirm that all steps completed successfully (✅ green checkmark).
If successful, updates will appear on the public site within a few minutes.
Manual deployment can be useful for quick testing or emergency rebuilds, but the preferred and safest method is to let the GitHub Action handle publishing automatically when changes are merged or pushed to main.
If you need to deploy the site manually (e.g., for testing or local builds):
Warning
The branch you are on matters! When running quarto publish gh-pages locally, the branch determines what content is published.
To avoid overwriting the live site with in-progress edits, always ensure you are on the main branch before deploying manually:
git checkout main
git pull origin main
quarto publish gh-pagesThis command performs the same steps as the GitHub Action, but runs locally on your machine. It will:
- Render the manual using the
_quarto.ymlconfiguration from whichever branch you are currently on. - Push the built HTML files to the remote
gh-pagesbranch. - Immediately update the live GitHub Pages site at
👉 https://seafood-globalization-lab.github.io/lab-manual/