Skip to content

Commit 7ef8766

Browse files
committed
Update deploy.yml
1 parent 1e8fbe9 commit 7ef8766

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,51 @@
1-
name: Deploy Docusaurus to GitHub Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
55
branches:
66
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
79

810
jobs:
9-
deploy:
11+
build:
12+
name: Build Docusaurus
1013
runs-on: ubuntu-latest
1114
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
14-
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v4
15+
- uses: actions/checkout@v4
1716
with:
18-
node-version: '18'
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
cache: npm
1922

2023
- name: Install dependencies
2124
run: npm ci
22-
2325
- name: Build website
2426
run: npm run build
2527

26-
- name: Deploy to GitHub Pages
27-
uses: peaceiris/actions-gh-pages@v4
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
2830
with:
29-
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
publish_dir: ./build
31-
cname: galio.io
31+
path: build
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)