chore(deps): Bump nesbot/carbon from 3.13.1 to 3.13.2 #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| types: [opened, reopened, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| # Serialize: all previews share one deploy branch on site-preview. | |
| concurrency: | |
| group: preview-build-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Set up PHP 8.4 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| tools: composer | |
| - name: Install dependencies | |
| run: composer i | |
| - name: Disable Matomo on previews | |
| run: sed -i "/'matomo_container'/d" config.production.php | |
| - name: Build site | |
| run: composer prod | |
| # mix() and locale_path() emit root-relative URLs ("/assets/...", "/posts"), | |
| # but previews live under a sub-path — prefix them so assets/links resolve. | |
| # Only the first URL per attribute is prefixed and CSS url(/...) is untouched; | |
| # revisit if responsive `srcset` or root-relative `url()` gets added. | |
| - name: Rewrite root-relative URLs to the PR sub-path | |
| run: | | |
| BASE="/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}" | |
| find build_production -name '*.html' -print0 \ | |
| | xargs -0 perl -i -pe "s{(href|src|srcset|content)=\"/(?!/)}{\$1=\"${BASE}/}g" | |
| - name: Upload preview build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: preview-build | |
| path: build_production/ | |
| retention-days: 1 |