Repository navigation
100 lines (85 loc) · 2.77 KB
/
Copy pathdeploy-use-cases-site.yml
File metadata and controls
100 lines (85 loc) · 2.77 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# WorkIt use cases site build and GitHub Pages deployment.
# Author: Admilson B. F. Cossa
# SPDX-License-Identifier: Apache-2.0
name: Use Cases Site
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/deploy-use-cases-site.yml"
- "apps/use-cases-site/**"
- "examples/ai-failure-lab/**"
- "package.json"
- "package-lock.json"
- "packages/core/**"
push:
branches:
- main
paths:
- ".github/workflows/deploy-use-cases-site.yml"
- "apps/use-cases-site/**"
- "examples/ai-failure-lab/**"
- "package.json"
- "package-lock.json"
- "packages/core/**"
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build use cases site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "22.x"
cache: npm
cache-dependency-path: |
package-lock.json
apps/use-cases-site/package-lock.json
examples/ai-failure-lab/package-lock.json
- name: Install root dependencies
run: npm ci --no-audit --no-fund
- name: Install site dependencies
run: npm ci --no-audit --no-fund
working-directory: apps/use-cases-site
- name: Install AI Failure Lab dependencies
run: npm ci --no-audit --no-fund
working-directory: examples/ai-failure-lab
- name: Test site contracts
run: npm test
working-directory: apps/use-cases-site
- name: Test AI Failure Lab decision parity
run: npm test
working-directory: examples/ai-failure-lab
- name: Build site
run: npm run build
working-directory: apps/use-cases-site
- name: Configure Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d
- name: Upload Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
with:
path: apps/use-cases-site/dist
deploy:
name: Deploy use cases site
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346