Skip to content

Commit 663bbc0

Browse files
committed
chore: make a workflow
1 parent 4bb7a71 commit 663bbc0

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
# Review gh actions docs if you want to further define triggers, paths, etc
9+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
10+
11+
jobs:
12+
build:
13+
name: Build Docusaurus
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 18
22+
cache: yarn
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
- name: Build website
27+
run: yarn build
28+
29+
- name: Upload Build Artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: build
33+
34+
deploy:
35+
name: Deploy to GitHub Pages
36+
needs: build
37+
38+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
39+
permissions:
40+
pages: write # to deploy to Pages
41+
id-token: write # to verify the deployment originates from an appropriate source
42+
43+
# Deploy to the github-pages environment
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)