-
-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (44 loc) · 1.26 KB
/
build-and-deploy-github-pages.yml
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
45
46
47
48
49
50
51
name: GitHub Pages - Build and Deploy 🏗️
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
workflow_dispatch:
permissions:
id-token: write # Require write permission to Fetch an OIDC token.
contents: write
pull-requests: write
jobs:
deploy_to_github_pages_job:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
name: Publish to GitHub Pages 🗞️
steps:
- name: Checkout 📥
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: 0
- name: Setup Node.js 🔧
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup bun 🔧
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install and Build 🔧
run: |
cd blog-website
npm ci
DOCUSAURUS_SSR_CONCURRENCY=5 npm run build
- name: Publish to GitHub Pages 🗞️
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: blog-website/build # The folder the action should deploy.