-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (44 loc) · 1.24 KB
/
deploy.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
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/deploy.yml'
- '.github/pages/**/*'
- 'src/**/*'
- 'static/**/*'
- 'package.json'
- 'package-lock.json'
- 'gatsby-*.js'
- '.nvmrc'
permissions:
# Push to gh-pages
contents: write
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Build Setup
uses: ./.github/actions/build-setup
- name: create .env.production file
run: |
touch .env.production
echo GATSBY_GA_MEASUREMENT_ID=${{ secrets.PROD_GA_MEASUREMENT_ID }} >> .env.production
echo GATSBY_ROBOTS_ENABLED=true >> .env.production
- name: Lint check
run: npm run lint-check
- name: Check types
run: npm run check-types
- name: Build site
run: npm run build
- name: Push to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: false # we regenerate the whole site
user_name: 'process-analytics-bot'
user_email: '[email protected]'