2024-05-22 20:42:24 -04:00
|
|
|
name: Deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: Deploy Website
|
2025-04-07 17:00:11 -04:00
|
|
|
runs-on: docker
|
2024-05-22 20:42:24 -04:00
|
|
|
steps:
|
|
|
|
- name: Set up SSH key
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo "${{ secrets.DEPLOY_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
|
|
chmod 600 ~/.ssh/id_rsa
|
|
|
|
|
2025-04-07 21:25:56 -04:00
|
|
|
- name: Install packages
|
|
|
|
run: |
|
|
|
|
apt-get update
|
|
|
|
apt-get -y install rsync
|
|
|
|
|
2024-05-22 20:42:24 -04:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
2025-04-07 17:00:11 -04:00
|
|
|
uses: https://github.com/peaceiris/actions-hugo@v3
|
2024-05-22 20:42:24 -04:00
|
|
|
with:
|
2025-04-12 14:00:21 -04:00
|
|
|
hugo-version: '0.146.3'
|
2024-05-22 20:42:24 -04:00
|
|
|
extended: true
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: hugo --minify
|
|
|
|
|
|
|
|
- name: Upload Repository
|
|
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
run: |
|
2024-07-03 15:48:28 -04:00
|
|
|
rsync -e "ssh -p 38901 -o StrictHostKeyChecking=no" --recursive --delete public/ deploy@ryne.moe:/srv/http/redstrate.com
|