Skip to content

Commit 658be0f

Browse files
authored
Update deploy.yml for GitHub Pages deployment
Added permissions and concurrency settings for GitHub Pages deployment.
1 parent 6d343f1 commit 658be0f

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
branches: [ main ]
66

7+
# Permissions required for deploying to GitHub Pages
78
permissions:
89
contents: read
910
pages: write
1011
id-token: write
1112

13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1214
concurrency:
1315
group: pages
1416
cancel-in-progress: false
@@ -20,12 +22,12 @@ jobs:
2022
- name: Checkout
2123
uses: actions/checkout@v4
2224
with:
23-
fetch-depth: 0
25+
fetch-depth: 0 # Not required if lastUpdated is not enabled in VitePress
2426

2527
- name: Setup Node
2628
uses: actions/setup-node@v4
2729
with:
28-
node-version: 20
30+
node-version: 20 # Menggunakan versi LTS yang stabil
2931
cache: npm
3032

3133
- name: Install Dependencies
@@ -34,6 +36,14 @@ jobs:
3436
- name: Build with VitePress
3537
run: npm run build
3638

39+
# -------------------------------------------------------
40+
# LANGKAH KRUSIAL: Membuat file CNAME
41+
# Ini memastikan GitHub Pages tahu domain ini milik Anda
42+
# setiap kali deploy baru dilakukan.
43+
# -------------------------------------------------------
44+
- name: Create CNAME
45+
run: echo "mivo.dyzulk.com" > .vitepress/dist/CNAME
46+
3747
- name: Upload artifact
3848
uses: actions/upload-pages-artifact@v3
3949
with:

0 commit comments

Comments
 (0)