This commit is contained in:
parent
0682d280ba
commit
5b1ed84518
1 changed files with 3 additions and 21 deletions
|
|
@ -6,13 +6,12 @@ on:
|
|||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build_and_deploy:
|
||||
runs-on: roadrunner
|
||||
defaults:
|
||||
run:
|
||||
working-directory: blog
|
||||
steps:
|
||||
|
||||
- name: Repository auschecken
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
|
@ -29,28 +28,11 @@ jobs:
|
|||
- name: Astro-Projekt bauen
|
||||
run: npm run build
|
||||
|
||||
- name: Build-Artefakte hochladen
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: astro-dist
|
||||
path: dist/
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: roadrunner
|
||||
steps:
|
||||
- name: Build-Artefakte herunterladen
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: astro-dist
|
||||
path: ./dist
|
||||
|
||||
- name: Auf Server deployen
|
||||
run: |
|
||||
echo "🚀 Deployment startet..."
|
||||
rm -rf /var/www/astro-app/*
|
||||
cp -r ./dist/* /var/www/astro-app/
|
||||
# SELinux-Kontext wiederherstellen
|
||||
cp -r dist/* /var/www/astro-app/
|
||||
restorecon -Rv /var/www/astro-app/
|
||||
echo "✅ Deployment erfolgreich!"
|
||||
|
||||
|
|
@ -70,4 +52,4 @@ jobs:
|
|||
-servername app.deine-domain.de 2>/dev/null \
|
||||
| openssl x509 -noout -enddate 2>/dev/null \
|
||||
| cut -d= -f2)
|
||||
echo "🔒 Zertifikat gültig bis: $EXPIRY"
|
||||
echo "🔒 Zertifikat gültig bis: $EXPIRY
|
||||
Loading…
Add table
Reference in a new issue