File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,14 @@ services:
21
21
# Change this if you specify a different root for your public site.
22
22
- ln -snf "${TUGBOAT_ROOT}/open-requirements-library" "${DOCROOT}"
23
23
24
- # Run any commands needed to build the site.
25
- build :
26
24
# Error occurred when implementing Tugboat preview.
27
25
# Solution: Inject .htaccess file to mimic GitHub pages behavior with URLs.
28
26
# Solution from: https://serverfault.com/questions/989333/using-apache-rewrite-rules-in-htaccess-to-remove-html-causing-a-500-error.
29
27
- echo "RewriteEngine On" > open-requirements-library/.htaccess
30
28
- echo "RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.html -f" >> open-requirements-library/.htaccess
31
29
- 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
+ - sed -i "s/const branch = 'main';/const branch = '$TUGBOAT_GITHUB_HEAD';/g" open-requirements-library/index.html
You can’t perform that action at this time.
0 commit comments