-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.05 KB
/
deploy.yml
File metadata and controls
44 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Deploy Docusaurus to GitHub Pages
on:
push:
branches:
- main # Sadece main branch'e push olunca çalışacak
workflow_dispatch: # Manuel çalıştırmak istersen
jobs:
build-deploy:
name: Build and Deploy Docusaurus
runs-on: ubuntu-latest
steps:
# 1. Kaynak kodu çek
- name: Checkout repository
uses: actions/checkout@v4
# 2. Node.js kur
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
# 3. Bağımlılıkları yükle
- name: Install dependencies
run: npm ci
# 4. Projeyi build et
- name: Build Docusaurus site
run: npm run build
# CNAME dosyasını build/ içine kopyala
- run: cp CNAME build/CNAME
# 5. GitHub Pages'e deploy et
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_PAT_PAGES }}
publish_dir: ./build
publish_branch: gh-pages
force_orphan: true