-
Notifications
You must be signed in to change notification settings - Fork 42
73 lines (73 loc) · 2.58 KB
/
deploy_gh_pages.yaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Deploy gh pages
on:
push:
branches:
- development
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/setup-dotnet@v4
name: Set up .NET Core SDK
with:
dotnet-version: 6.0.x
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: yarn global add graphql @graphql-inspector/cli
- name: Install .NET dependencies
run: dotnet restore
- name: Build GraphQL Node
run: dotnet build --no-restore NineChronicles.Headless.Executable
- name: Build GraphQL Schema
run: |
dotnet run --project NineChronicles.Headless.Executable -- \
--graphql-server \
--graphql-port 30000 \
--graphql-host localhost \
--store-path /tmp/store \
--no-miner \
--no-cors \
--skip-preload \
-H localhost \
-V "0/CbfC996ad185c61a031f40CeeE80a055e6D83005/MEUCIQCtoZmiFgg5NXW7+5jYMae80lTlj7xO4tQfX9CnvomAtwIgWViM8s.4mYQ89wlGkohmynZ43olDzZLBk.bHShKCVrc=" \
-G "https://9c-dx.s3.ap-northeast-2.amazonaws.com/empty-genesis-block-20230511" &
sleep 60s
graphql-inspector introspect http://localhost:30000/graphql --write schema.graphql
- name: Build GraphQL Document
run: |
yarn global add spectaql
spectaql --target-dir public/graphql ./spectaql-config.yaml
- name: Build CLI Document
run: |
mkdir -p public/cli
dotnet run --project NineChronicles.Headless.Executable -- \
docs \
public/cli
- name: Copy Landing Page to deploy
run: cp Docs/resources/landing.html public/index.html
- name: Copy GraphQL Schema to deploy
run: cp schema.graphql public/schema.graphql
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public