-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.13 KB
/
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
name: Build and Deploy Docs
on:
push:
branches:
- main
pull_request:
jobs:
build-publish:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
REACT_APP_DOC_SEARCH_APP_ID: ${{ secrets.DOC_SEARCH_APP_ID }}
REACT_APP_DOC_SEARCH_INDEX_NAME: ${{ secrets.DOC_SEARCH_INDEX_NAME }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js 18.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
user_name: brave-builds[bot]
user_email: [email protected]