erm, here goes nothing...
This commit is contained in:
@@ -18,8 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
with: github-server-url: 'https://git.cjsatnarine.space'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Zola
|
||||
run: |
|
||||
@@ -29,11 +28,21 @@ jobs:
|
||||
- name: Build
|
||||
run: ./zola build
|
||||
|
||||
- name: Deploy
|
||||
- name: Write SSH Keys
|
||||
run: |
|
||||
apt update -y && apt-get install -y --no-install-recommends rsync
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add - <<< "${SSH_PRIVATE_KEY}"
|
||||
mkdir -p ~/.ssh/
|
||||
ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts
|
||||
rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}"
|
||||
install -m 600 -D /dev/null ~/.ssh/id_ed25519
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H 192.168.0.21 > ~/.ssh/known_hosts
|
||||
|
||||
- name: Copy built site to server
|
||||
run: ssh cj@192.168.0.21 "rm -rf /var/www/cjsatnarine.space && mkdir /var/www/cjsatnarine.space"
|
||||
scp -sr public/. cj@192.168.0.21:/var/www/cjsatnarine.space
|
||||
|
||||
# - name: Deploy
|
||||
# run: |
|
||||
# apt update -y && apt-get install -y --no-install-recommends rsync
|
||||
# eval "$(ssh-agent -s)"
|
||||
# ssh-add - <<< "${SSH_PRIVATE_KEY}"
|
||||
# mkdir -p ~/.ssh/
|
||||
# ssh-keyscan -H ${HOST} >> ~/.ssh/known_hosts
|
||||
# rsync -r --delete-after public/* "${SSH_USERNAME}@${HOST}:${HOST_DIR}"
|
||||
|
Reference in New Issue
Block a user