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 3 additions and 9 deletions
Showing only changes of commit e824b07837 - Show all commits

View File

@ -47,15 +47,6 @@ jobs:
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \
jekyll build --verbose
continue-on-error: true
- name: Prepare ssh key
id: prepare_ssh_key
if: ${{ gitea.ref == 'refs/heads/main' }}
run: |
echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
rsync -n -halvi \
-e "ssh -a -x -o StrictHostKeyChecking=no" \
./_site/ www@lafs.eval.latfa.net:/var/www/site/
- name: Deploy Jekyll site
id: deploy_site
run: |
@ -71,6 +62,9 @@ jobs:
# Save those variabes in the environment for the next steps
echo "WEB_HOST=${WEB_HOST}" >> $GITHUB_ENV
echo "WEB_CONTEXT=${WEB_CONTEXT}" >> $GITHUB_ENV
# Prepare ssh key
echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Synchronize the local and the remote site
rsync -halvi --delete \
-e "ssh -a -x -o StrictHostKeyChecking=no" \