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