2024-10-07 03:30:10 +00:00
|
|
|
name: Deploy latest site
|
2024-07-15 06:43:41 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2024-10-07 03:30:10 +00:00
|
|
|
deploy:
|
2024-07-15 06:43:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-10-07 03:30:10 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2024-07-15 06:43:41 +00:00
|
|
|
|
2024-10-07 03:30:10 +00:00
|
|
|
- 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
|
2024-07-15 06:43:41 +00:00
|
|
|
|
2024-10-07 03:30:10 +00:00
|
|
|
- name: Run rotten-build command
|
|
|
|
run: |
|
|
|
|
ssh -o StrictHostKeyChecking=yes ${{ secrets.SSH_USERNAME }}@${{ secrets.SERVER_ADDRESS }} "sudo rotten-build"
|