-
Notifications
You must be signed in to change notification settings - Fork 196
81 lines (70 loc) · 2.42 KB
/
production.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
name: Build and verify production
# -------------------------------------------------------------
# This workflow will build and verify pull requests. It will:
# - Build the main branch
# - Report on the compiled output
# - Run visual regression tests
# - Publish the PR branch to Netlify
# -------------------------------------------------------------
on:
push:
branches: [main, spectrum-two]
permissions:
contents: read
pull-requests: write
concurrency:
group: "${{ github.workflow }} @ main"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
# -------------------------------------------------------------
# Validate build for various environments
# -------------------------------------------------------------
build:
name: Build
strategy:
fail-fast: false
matrix:
system:
- macos-latest
- ubuntu-latest
node-version:
- 20
uses: ./.github/workflows/build.yml
with:
system: ${{ matrix.system }}
node-version: ${{ matrix.node-version }}
secrets: inherit
# -------------------------------------------------------------
# RUN VISUAL REGRESSION TESTS --- #
# Run VRT on all pushes to main
# -------------------------------------------------------------
vrt:
name: Testing
uses: ./.github/workflows/vrt.yml
with:
skip: ${{ github.base_ref != 'main' }}
secrets: inherit
# -------------------------------------------------------------
# PUBLISH TO NETLIFY --- #
# Publish to netlify by leveraging the previous build and then building the site as well
# -------------------------------------------------------------
publish_site:
name: Publish
# The build step ensures we are leveraging the cache for the build
needs: [vrt]
uses: ./.github/workflows/publish-site.yml
with:
storybook-url: ${{ needs.vrt.outputs.storybook-url || '' }}
secrets: inherit
todo_to_issue:
name: Add issues for new TODOs
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Convert new TODO items to issues
uses: alstr/todo-to-issue-action@v4