Deploy preview site to review pull requests #5

Merged
btlogy merged 32 commits from 1.site-preview into main 2024-05-24 11:08:07 +00:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 3ec0bdf4fc - Show all commits

View File

@ -46,7 +46,9 @@ jobs:
run: | run: |
# Overwrite the baseurl for previewonly # Overwrite the baseurl for previewonly
if [ "${{ gitea.event }}" = 'pull_request' ]; then if [ "${{ gitea.event }}" = 'pull_request' ]; then
echo "Overwriting baseurl for pull_request ${{ gitea.event.pull_request.number }}"
sed -i -r -e 's/^baseurl:\s*"([^"]*)"/baseurl: "\1\/${{ gitea.event.pull_request.number }}"/' _config.yml sed -i -r -e 's/^baseurl:\s*"([^"]*)"/baseurl: "\1\/${{ gitea.event.pull_request.number }}"/' _config.yml
grep "baseurl:" _config.yml
fi fi
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \ docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \
jekyll build --verbose jekyll build --verbose