-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.56 KB
/
build_and_publish.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
name: Gatsby Publish
on:
push:
branches:
[ main ]
pull_request:
types: [ opened, synchronize, reopened ]
workflow_dispatch:
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci
- run: npm run test
env:
CI: true
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci
- run: ./scripts/preprocess-publications.js
- run: ./scripts/preprocess-talks.js
- run: npm run build
env:
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_ONLY_API_KEY: ${{ secrets.ALGOLIA_SEARCH_ONLY_API_KEY }}
ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_API_KEY }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
BEAM_ID: ${{secrets.BEAM_ID}}
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
NODE_ENV: production
GATSBY_ACTIVE_ENV: production
- run: npm run test:int
env:
CI: true
- name: Deploy
# Only try and deploy on merged code
if: "github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./public # The folder the action should deploy.
branch: pages
- run: npm run test:links
env:
CI: true