forked from starknet-io/starknet.js
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.31 KB
/
manual-docs-deploy-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
52
name: '[Manual] Documentation Deploy Pages'
on: workflow_dispatch
# populate the following environment variables for the "github-pages" environment
# - default:
# ORGANIZATION_NAME
# PROJECT_NAME
# DEPLOYMENT_BRANCH
# - custom:
# DOCS_BASE_URL
jobs:
build:
name: Documentation build
runs-on: ubuntu-latest
environment: github-pages
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Setup
run: |
npm ci --ignore-scripts
cd www/
npm ci --ignore-scripts
- name: Build
run: |
rm -rf www/docs/API/
npm run docs:build
env:
DOCS_BASE_URL: ${{ vars.DOCS_BASE_URL || '/starknet.js/' }}
- name: Upload
uses: actions/upload-pages-artifact@v3
with:
path: www/build
deploy:
name: documentation deploy
runs-on: ubuntu-latest
needs: [build]
permissions:
pages: write # to deploy to pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: deploy
id: deployment
uses: actions/deploy-pages@v4