mirror of
https://github.com/rottenwheel/hugo-rottenwheel.git
synced 2024-11-08 11:40:04 +00:00
25 lines
579 B
YAML
25 lines
579 B
YAML
name: Deploy latest site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup SSH
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id
|
|
chmod 600 ~/.ssh/id
|
|
echo "${{ secrets.SERVER_FINGERPRINT }}" >> ~/.ssh/known_hosts
|
|
|
|
- name: Run rotten-build command
|
|
run: |
|
|
ssh -i ~/.ssh/id -o StrictHostKeyChecking=yes ${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_ADDRESS }} "sudo rotten-build"
|