Skip to content

Commit 77d10a0

Browse files
authored
Merge pull request #10 from CivicActions/mgifford-patch-2
Create Drupal-Certified.md
2 parents 69e2e88 + ac72ffb commit 77d10a0

File tree

2 files changed

+573
-2
lines changed

2 files changed

+573
-2
lines changed

.tugboat/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ services:
2121
# Change this if you specify a different root for your public site.
2222
- ln -snf "${TUGBOAT_ROOT}/open-requirements-library" "${DOCROOT}"
2323

24-
# Run any commands needed to build the site.
25-
build:
2624
# Error occurred when implementing Tugboat preview.
2725
# Solution: Inject .htaccess file to mimic GitHub pages behavior with URLs.
2826
# Solution from: https://serverfault.com/questions/989333/using-apache-rewrite-rules-in-htaccess-to-remove-html-causing-a-500-error.
2927
- echo "RewriteEngine On" > open-requirements-library/.htaccess
3028
- echo "RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.html -f" >> open-requirements-library/.htaccess
3129
- echo "RewriteRule "'!'"\.\w{2,4}$ %{REQUEST_URI}.html [L]" >> open-requirements-library/.htaccess
30+
31+
# Run any commands needed to build the site.
32+
build:
33+
# Switch the branch in index.html to match the PR branch
34+
- if [ -n "$TUGBOAT_GITHUB_HEAD" ]; then sed -i "s/const branch = 'main';/const branch = '$TUGBOAT_GITHUB_HEAD';/g" open-requirements-library/index.html; fi

0 commit comments

Comments
 (0)