Deploy preview site to review pull requests #5
|
@ -47,15 +47,6 @@ jobs:
|
||||||
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
|
||||||
continue-on-error: true
|
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
|
- name: Deploy Jekyll site
|
||||||
id: deploy_site
|
id: deploy_site
|
||||||
run: |
|
run: |
|
||||||
|
@ -71,6 +62,9 @@ jobs:
|
||||||
# Save those variabes in the environment for the next steps
|
# Save those variabes in the environment for the next steps
|
||||||
echo "WEB_HOST=${WEB_HOST}" >> $GITHUB_ENV
|
echo "WEB_HOST=${WEB_HOST}" >> $GITHUB_ENV
|
||||||
echo "WEB_CONTEXT=${WEB_CONTEXT}" >> $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
|
# Synchronize the local and the remote site
|
||||||
rsync -halvi --delete \
|
rsync -halvi --delete \
|
||||||
-e "ssh -a -x -o StrictHostKeyChecking=no" \
|
-e "ssh -a -x -o StrictHostKeyChecking=no" \
|
||||||
|
|
Loading…
Reference in New Issue