-
Notifications
You must be signed in to change notification settings - Fork 1.8k
83 lines (72 loc) · 2.22 KB
/
docusaurus.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
name: Docusaurus
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build-compiler-explorer:
name: Build Compiler Explorer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Build Compiler Playground Wasm NPM package"
run: wasm-pack build --target web
working-directory: ./compiler/crates/relay-compiler-playground
- uses: actions/upload-artifact@v4
with:
name: compiler-playground-package
path: compiler/crates/relay-compiler-playground/pkg/
build-and-deploy:
runs-on: ubuntu-latest
needs: [build-compiler-explorer]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: website/yarn.lock
- name: Set up Docusaurus Build Cache
id: cache-docusaurus
uses: actions/cache@v4
with:
path: |
website/node_modules/.cache
website/.docusaurus
key: "docusaurus-build-${{ hashFiles('website/yarn.lock') }}"
- name: Download Compiler Explorer
uses: actions/download-artifact@v4
with:
name: compiler-playground-package
path: tmp/compiler-playground-package
- name: Link Compiler Explorer
run: yarn link
working-directory: tmp/compiler-playground-package
- name: Install and Build
run: |
yarn
yarn link relay-compiler-playground
yarn build
working-directory: website/
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: website/build
clean: true