File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -16,34 +16,33 @@ concurrency:
16
16
17
17
jobs :
18
18
deploy :
19
- environment :
20
- name : github-pages
21
- url : ${{ steps.deployment.outputs.page_url }}
22
19
runs-on : ubuntu-latest
23
20
steps :
24
- # Minimaler Checkout
21
+ # Schritt 1: Checkout nur der notwendigen Dateien (Sparse Checkout)
25
22
- name : Checkout
26
23
uses : actions/checkout@v4
27
24
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/**
29
28
30
- # Erstelle ein Build-Verzeichnis, wenn nötig
29
+ # Schritt 2: Kopieren der statischen Dateien in das Public-Verzeichnis
31
30
- name : Prepare Content
32
31
run : |
33
32
mkdir -p public
34
- rsync -a --delete . public/ # Kopiere nur relevante Änderungen ins Verzeichnis
33
+ rsync -av --delete ./path/to/static/files/ ./ public/
35
34
36
- # Setup für Pages
35
+ # Schritt 3: Setup Pages
37
36
- name : Setup Pages
38
37
uses : actions/configure-pages@v5
39
38
40
- # Nur geänderte Dateien hochladen
39
+ # Schritt 4: Upload artifact
41
40
- name : Upload artifact
42
41
uses : actions/upload-pages-artifact@v3
43
42
with :
44
43
path : public
45
44
46
- # Deploy auf GitHub Pages
45
+ # Schritt 5: Deploy auf GitHub Pages
47
46
- name : Deploy to GitHub Pages
48
47
id : deployment
49
48
uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments