Add steps to continously deploy the Jekyll site (#3)
Jekyll / jekyll (push) Successful in 19s
Details
Jekyll / jekyll (push) Successful in 19s
Details
Signed-off-by: Benoit Donneaux <benoit@leastauthority.com> Reviewed-on: #3 Co-authored-by: Benoit Donneaux <benoit@leastauthority.com> Co-committed-by: Benoit Donneaux <benoit@leastauthority.com>
This commit is contained in:
parent
097fc8acc6
commit
5469848faf
|
@ -19,11 +19,11 @@ jobs:
|
||||||
id: file_ownership
|
id: file_ownership
|
||||||
run: |
|
run: |
|
||||||
chown -R ${_UID}:${_GID} .
|
chown -R ${_UID}:${_GID} .
|
||||||
- name: Install docker
|
- name: Install requirements
|
||||||
id: install_docker
|
id: install_requirements
|
||||||
run: |
|
run: |
|
||||||
apt-get -q update
|
apt-get -q update
|
||||||
apt-get -q install -y docker-compose
|
apt-get -q install -y docker-compose rsync
|
||||||
apt-get -q clean
|
apt-get -q clean
|
||||||
- name: Verify docker
|
- name: Verify docker
|
||||||
id: verify_docker
|
id: verify_docker
|
||||||
|
@ -43,3 +43,16 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
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
|
||||||
|
- name: Prepare ssh key
|
||||||
|
id: prepare_ssh_key
|
||||||
|
if: ${{ github.ref == 'main' }}
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
- name: Publish Jekyll site
|
||||||
|
id: publish_site
|
||||||
|
if: ${{ github.ref == 'main' }}
|
||||||
|
run: |
|
||||||
|
rsync -halvi \
|
||||||
|
-e "ssh -a -x -o StrictHostKeyChecking=no" \
|
||||||
|
./_site/ www@lafs.eval.latfa.net:/var/www/site/
|
||||||
|
|
Loading…
Reference in New Issue