forked from planetarium/NineChronicles.Headless
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (61 loc) · 2 KB
/
deploy_gh_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
53
54
55
56
57
58
59
60
61
name: Deploy gh pages
on:
push:
branches:
- development
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/setup-dotnet@v3
name: Set up .NET Core SDK
with:
dotnet-version: 6.0.x
- name: Build GraphQL Schema
run: |
dotnet restore
dotnet build
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://download.nine-chronicles.com/genesis-block-9c-main" &
sleep 180s
wget http://localhost:30000/schema.graphql -O schema.graphql
- name: Cache node modules
uses: actions/cache@v2
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: npm install -g @2fd/graphdoc
- name: Build
run: graphdoc -s schema.graphql -o doc
- name: Copy GraphQL Schema to deploy
run: cp schema.graphql doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc