We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f60ef1 commit bc46f1aCopy full SHA for bc46f1a
1 file changed
.github/workflows/deploy-pr-preview.yml
@@ -28,6 +28,14 @@ jobs:
28
- name: Run composer command
29
run: composer prod
30
31
+ - name: Fix asset paths for subdirectory deployment
32
+ run: |
33
+ BASE_PATH="/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}"
34
+ find build_production -type f -name "*.html" -exec sed -i "s|href=\"/assets/|href=\"$BASE_PATH/assets/|g" {} +
35
+ find build_production -type f -name "*.html" -exec sed -i "s|src=\"/assets/|src=\"$BASE_PATH/assets/|g" {} +
36
+ find build_production -type f -name "*.css" -exec sed -i "s|url(/assets/|url($BASE_PATH/assets/|g" {} +
37
+ find build_production -type f -name "*.css" -exec sed -i "s|url(\"/assets/|url(\"$BASE_PATH/assets/|g" {} +
38
+
39
- name: Deploy preview
40
uses: rossjrw/pr-preview-action@v1
41
with:
0 commit comments