Initial: Hugo + Terraform Staging/Production Pipeline

This commit is contained in:
2026-05-06 18:02:41 +00:00
commit 3e61e70f36
12 changed files with 255 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Deploy Production
on:
push:
tags:
- "v*"
jobs:
production:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: SSH Key einrichten
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
echo "${{ secrets.PROD_HOST_KEY }}" >> ~/.ssh/known_hosts
- name: Hugo Build
run: hugo --minify --source ./hugo
- name: Deploy auf Production
run: |
rsync -az --delete \
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no" \
./hugo/public/ \
root@${{ secrets.PROD_IP }}:/var/www/html/