Skip to content

Commit ebffa1c

Browse files
committed
Try again
1 parent d09cbdd commit ebffa1c

File tree

1 file changed

+39
-19
lines changed

1 file changed

+39
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,52 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches:
6-
- pages # Change this to your default branch if it's different
6+
- pages
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
11-
1214
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 18
22+
cache: npm
23+
cache-dependency-path: "./documentation/package-lock.json"
24+
- name: Install dependencies
25+
working-directory: documentation
26+
run: npm ci
27+
- name: Build website
28+
working-directory: documentation
29+
run: npm run build
1530

16-
- name: Setup Node.js
17-
uses: actions/setup-node@v2
31+
- name: Upload Build Artifact
32+
uses: actions/upload-pages-artifact@v3
1833
with:
19-
node-version: 18 # Use Node.js 18 here
34+
path: documentation/build
2035

21-
- name: Install dependencies
22-
working-directory: ./documentation
23-
run: npm install
36+
deploy:
37+
name: Deploy to GitHub Pages
38+
needs: build
2439

25-
- name: Build site
26-
working-directory: ./documentation
27-
run: npm run build
40+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
41+
permissions:
42+
pages: write # to deploy to Pages
43+
id-token: write # to verify the deployment originates from an appropriate source
44+
45+
# Deploy to the github-pages environment
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
2849

50+
runs-on: ubuntu-latest
51+
steps:
2952
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v3
31-
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./documentation/build # Change this if your build output directory is different
34-
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)