Skip to content

Commit d7d5259

Browse files
committed
use crazy-max
1 parent c5f4697 commit d7d5259

File tree

1 file changed

+25
-40
lines changed

1 file changed

+25
-40
lines changed

.github/workflows/deploy.yaml

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,38 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy specification
22

33
on:
44
push:
55
branches:
66
- main
7-
workflow_dispatch:
7+
8+
env:
9+
# this avoids node running out of memory while building
10+
NODE_OPTIONS: --max_old_space_size=20480
811

912
jobs:
10-
build:
11-
name: Build Docs
13+
deploy-gh-pages:
14+
permissions:
15+
pages: write
16+
id-token: write
17+
1218
runs-on: ubuntu-latest
1319
steps:
1420
- uses: actions/checkout@v4
21+
- name: Use Node.js 22
22+
uses: actions/setup-node@v4
1523
with:
16-
fetch-depth: 0
17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: 20
20-
cache: npm
21-
22-
- name: Install dependencies
23-
run: npm install --frozen-lockfile
24-
25-
- name: Build specs and website
26-
run: |
27-
npm run build
28-
npm run build:docs
29-
30-
- name: Upload Build Artifact
31-
uses: actions/upload-pages-artifact@v3
32-
with:
33-
path: build
24+
node-version: '22'
25+
- run: npm ci
26+
- run: npm run build
27+
- run: 'sed -i -e "s|Prefix: \"\"|Prefix: \"/execution-apis\"|g" build/docs/gatsby/gatsby-config.js'
28+
- run: 'sed -i -e "s|/api|api|g" build/docs/gatsby/src/pages/index.tsx'
29+
- run: npm run build:docs
3430

35-
deploy:
36-
name: Deploy to GitHub Pages
37-
needs: build
38-
39-
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
40-
permissions:
41-
pages: write # to deploy to Pages
42-
id-token: write # to verify the deployment originates from an appropriate source
43-
44-
# Deploy to the github-pages environment
45-
environment:
46-
name: github-pages
47-
url: ${{ steps.deployment.outputs.page_url }}
48-
49-
runs-on: ubuntu-latest
50-
steps:
5131
- name: Deploy to GitHub Pages
52-
id: deployment
53-
uses: actions/deploy-pages@v4
32+
if: success()
33+
uses: crazy-max/ghaction-github-pages@v4
34+
with:
35+
target_branch: gh-pages
36+
build_dir: build/docs/gatsby/public
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)