feat: Update workflows for Token-based Git clone

This commit is contained in:
Sebastian Serfling
2026-05-07 14:56:37 +02:00
parent 4d5020ab7b
commit 7c1b9a5e40
4 changed files with 77 additions and 43 deletions
+11 -14
View File
@@ -7,26 +7,23 @@ on:
jobs:
production:
runs-on: ubuntu-latest
runs-on: production
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: SSH Key einrichten
- name: Configure Git Token
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
git config --global url."https://sebastian.serfling:${{ secrets.GIT_TOKEN }}@gitlab.stines.de/".insteadOf "https://gitlab.stines.de/"
- name: Hugo Build
run: hugo --minify --source ./hugo
- name: Deploy auf Production
- name: Hugo Build & Deploy
run: |
rsync -az --delete \
-e "ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no" \
./hugo/public/ \
root@${{ secrets.PROD_IP }}:/var/www/html/
set -e
# Hugo Build direkt in /var/www/html
hugo --minify --source ./hugo -d /var/www/html
echo "✅ Production Hugo Build erfolgreich!"
echo "🚀 Live unter https://stines.de"