-
Notifications
You must be signed in to change notification settings - Fork 143
41 lines (38 loc) · 1.27 KB
/
generate-graphql-docs.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
name: "Generate GraphQL Docs"
concurrency: ${{ github.workflow }}
on:
push:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: actions/checkout@v3
with:
path: main
- uses: actions/checkout@v3
with:
ref: docs
path: docs
- run: nix develop -c pnpm install --frozen-lockfile
working-directory: main/core/api
- run: nix develop -c ytt -f spectaql/TUTORIAL.md -f spectaql/spectaql-config-template.yml > spectaql-config.yml
working-directory: main/core/api
- name: Build docs
run: nix develop -c pnpm run build-docs
working-directory: main/core/api
- run: cp main/core/api/public/index.html docs
- run: cp main/core/api/public/logo.png docs/images
- name: Deploy docs
working-directory: docs
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Update docs: $GITHUB_SHA"
git push