try to upload using private key
This commit is contained in:
parent
fc6b13ff15
commit
09f2c13630
1 changed files with 11 additions and 6 deletions
|
@ -4,7 +4,7 @@ on: push
|
||||||
env:
|
env:
|
||||||
DEV_SHELL_NAME: CI
|
DEV_SHELL_NAME: CI
|
||||||
jobs:
|
jobs:
|
||||||
check_config:
|
Check config:
|
||||||
runs-on: flakes-action
|
runs-on: flakes-action
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -18,15 +18,20 @@ jobs:
|
||||||
- name: Flake check
|
- name: Flake check
|
||||||
run: |
|
run: |
|
||||||
nix flake check
|
nix flake check
|
||||||
build:
|
Publish:
|
||||||
runs-on: flakes-action
|
runs-on: flakes-action
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
name: Checkout
|
name: Checkout
|
||||||
- name: build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
nix develop -c hugo --gc --minify
|
nix develop -c hugo --gc --minify
|
||||||
- name: publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
echo "TODO: copy private key"
|
mkdir -p ~/.ssh/
|
||||||
nix develop -c rsync -avz public/ root@mb1:/var/www/blog/
|
cat >> ~/.ssh/id_ed25519 << EOF
|
||||||
|
${{ secrets.MB1_SSH_UPLOAD_KEY }}
|
||||||
|
EOF
|
||||||
|
chmod 400 ~/.ssh/id_ed25519
|
||||||
|
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILqDeXcIQwLXxuueu9KTC6y6NPUUzDRdF4Q5NUk+nFwt upload@blog" > ~/.ssh/id_ed25519.pub
|
||||||
|
nix develop -c rsync -avz -e 'ssh -o StrictHostKeyChecking=accept-new' public/ blog@blog.cyplo.net:/var/www/blog/
|
Loading…
Reference in a new issue