Skip to content

Commit

Permalink
Add netlify deploy script (CodeYourFuture#776)
Browse files Browse the repository at this point in the history
We were previously not setting --baseURL which means that deploy
previews have internal links to the prod deploys rather than the deploy
previews.

Instead we introduce a script so that we can edit for all of the sites
without needing to go change several site configs each time we want to
make a change.
  • Loading branch information
illicitonion authored Jul 30, 2024
1 parent 0d91e1e commit 686ee61
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions common-content/deploy-netlify.sh
1 change: 1 addition & 0 deletions common-theme/deploy-netlify.sh
6 changes: 6 additions & 0 deletions deploy-netlify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -euo pipefail

# We set --baseURL on netlify so that any references to .Permalink end up pointing at deploy preview pages, rather than being hard-coded to point at the production URLs.
hugo --minify --baseURL $DEPLOY_PRIME_URL && npx pagefind --site "public"
1 change: 1 addition & 0 deletions org-cyf-guides/deploy-netlify.sh
1 change: 1 addition & 0 deletions org-cyf-itp/deploy-netlify.sh
1 change: 1 addition & 0 deletions org-cyf-piscine/deploy-netlify.sh
1 change: 1 addition & 0 deletions org-cyf-sdc/deploy-netlify.sh
1 change: 1 addition & 0 deletions org-cyf/deploy-netlify.sh
1 change: 1 addition & 0 deletions org-mcb/deploy-netlify.sh

0 comments on commit 686ee61

Please sign in to comment.