Skip to content

Commit 43dd2cf

Browse files
Update static.yml
1 parent c8517da commit 43dd2cf

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/static.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,33 @@ concurrency:
1616

1717
jobs:
1818
deploy:
19-
environment:
20-
name: github-pages
21-
url: ${{ steps.deployment.outputs.page_url }}
2219
runs-on: ubuntu-latest
2320
steps:
24-
# Minimaler Checkout
21+
# Schritt 1: Checkout nur der notwendigen Dateien (Sparse Checkout)
2522
- name: Checkout
2623
uses: actions/checkout@v4
2724
with:
28-
fetch-depth: 1 # Reduziert die Zeit für den Checkout, da nur der letzte Commit geladen wird
25+
fetch-depth: 1
26+
sparse-checkout: |
27+
/path/to/static/files/**
2928
30-
# Erstelle ein Build-Verzeichnis, wenn nötig
29+
# Schritt 2: Kopieren der statischen Dateien in das Public-Verzeichnis
3130
- name: Prepare Content
3231
run: |
3332
mkdir -p public
34-
rsync -a --delete . public/ # Kopiere nur relevante Änderungen ins Verzeichnis
33+
rsync -av --delete ./path/to/static/files/ ./public/
3534
36-
# Setup für Pages
35+
# Schritt 3: Setup Pages
3736
- name: Setup Pages
3837
uses: actions/configure-pages@v5
3938

40-
# Nur geänderte Dateien hochladen
39+
# Schritt 4: Upload artifact
4140
- name: Upload artifact
4241
uses: actions/upload-pages-artifact@v3
4342
with:
4443
path: public
4544

46-
# Deploy auf GitHub Pages
45+
# Schritt 5: Deploy auf GitHub Pages
4746
- name: Deploy to GitHub Pages
4847
id: deployment
4948
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)