-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (44 loc) · 1.16 KB
/
build-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
42
43
44
45
46
47
48
name: Documentation build
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash
env:
REGISTRY: ghcr.io
IMAGE_NAME: prism-documentation-portal
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
fetch-depth: 0
- name: Update submodules
run: |
git submodule update --remote --recursive
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install
- name: Build website
run: |
yarn build --out-dir infra/website
release:
if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'chore(release)')
uses: ./.github/workflows/release.yml
secrets: inherit
deploy:
if: startsWith(github.ref, 'refs/tags') && contains(github.event.head_commit.message, 'chore(release)')
uses: ./.github/workflows/deployment.yml
with:
version: "${{ github.ref_name }}"
env: "staging"
secrets: inherit