31 lines
727 B
YAML
31 lines
727 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: node:20-bullseye
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build
|
|
run: |
|
|
wget https://github.com/gohugoio/hugo/releases/download/v0.147.1/hugo_0.147.1_linux-amd64.tar.gz
|
|
tar -xzf hugo_0.147.1_linux-amd64.tar.gz
|
|
./hugo
|
|
|
|
- name: Deploy
|
|
env:
|
|
SSH_KEY: ${{ secrets.HUGO_SSH_PRIVATE }}
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
ssh-keyscan tokyo >> ~/.ssh/known_hosts
|
|
scp -r public/* hugo@tokyo:/home/admin/data/web/personal/
|