-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (31 loc) · 1002 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build and Deploy
on:
push:
tags:
- ''
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST_KEY: ${{ secrets.SSH_HOST_KEY }}
SSH_USER_HOST_LOCATION: ${{ secrets.SSH_USER_HOST_LOCATION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Prepare Quarto Project
run: |
docker run -v ${{ github.workspace }}:/app -w /app -u root jcfdsilva/quarto_full:latest /bin/bash -c "python3 ./resources/scripts/deploy.py"
- name: Deploy
run: |
apt-get update && apt-get install -y rsync
which ssh-agent || (apt-get update && apt-get install -y openssh-client)
mkdir -p ~/.ssh
eval $(ssh-agent -s)
echo "${SSH_PRIVATE_KEY}" | ssh-add -
echo "${SSH_HOST_KEY}" > ~/.ssh/known_hosts
ls -la
ls -la _site
rsync -hrvz --delete _site/* "${SSH_USER_HOST_LOCATION}/dev"