try to upload using private key
build and publish / Publish (push) Failing after 1m40s Details
build and publish / Check config (push) Successful in 1m57s Details

Cyryl Płotnicki 2023-08-12 18:56:26 +01:00
parent fc6b13ff15
commit df68b619de
1 changed files with 13 additions and 6 deletions

View File

@ -4,7 +4,7 @@ on: push
env:
DEV_SHELL_NAME: CI
jobs:
check_config:
Check config:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
@ -18,15 +18,22 @@ jobs:
- name: Flake check
run: |
nix flake check
build:
Publish:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
name: Checkout
- name: build
- name: Build
run: |
nix develop -c hugo --gc --minify
- name: publish
- name: Publish
run: |
echo "TODO: copy private key"
nix develop -c rsync -avz public/ root@mb1:/var/www/blog/
mkdir -p ~/.ssh/
cat >> ~/.ssh/id_ed25519 << EOF
${{ secrets.MB1_SSH_UPLOAD_KEY }}
EOF
chmod 400 ~/.ssh/id_ed25519
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB9dJ1elfJvH9SgmSVKOYgkxJBagWusLvJJ9RsEnzCik blog@host" > ~/.ssh/id_ed25519.pub
ls -hal ~/.ssh/
head ~/.ssh/id_ed25519
nix develop -c rsync -avz -e 'ssh -o StrictHostKeyChecking=accept-new' public/ blog@blog.cyplo.net:/var/www/blog/