-
Notifications
You must be signed in to change notification settings - Fork 8
97 lines (96 loc) · 2.91 KB
/
DEV-web.yaml
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
name: DEV - Build & Deploy equinor.com
on:
workflow_dispatch:
push:
branches:
- staging
paths:
- 'web/**'
- '!web/README.md'
- '!web/.storybook/**'
- '!web/.gitignore'
- '!web/jest.config.cjs'
- '!web/jest.setup.ts'
- './FeatureFlags.js'
- '!web/components/README.md'
repository_dispatch:
types: [sanity_publish]
permissions:
id-token: write
packages: write
jobs:
check-code:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
DOCKER_BUILDKIT: 1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
ref: staging
- name: Install pnpm 📦
id: install-pnpm
uses: pnpm/[email protected]
with:
version: '^8.5.1'
- name: Cache pnpm modules 💾
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies 🔧
id: install-dependencies
run: |
pnpm install
pnpm install --filter energy-vision-web
- name: Run ESLint 🔎
id: lint
run: |
pnpm lint:web
- name: Run tests 🔍
id: test
run: |
pnpm test --filter energy-vision-web
- name: log-errors-to-slack 📄
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()
deploy-global-development:
needs: check-code
runs-on: ubuntu-latest
environment:
name: development
url: https://web-global-development-equinor-web-sites-dev.c2.radix.equinor.com/
strategy:
# The matrix approach is needed to re-use code created for satellites
matrix:
dataset: ['global-development']
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
DOCKER_BUILDKIT: 1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- id: deploy-global
uses: ./.github/workflows/deploy-websites/
with:
imageName: ghcr.io/equinor/energyvision/web-${{ matrix.dataset }}
datasetName: ${{ matrix.dataset }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
sanityApiToken: ${{ secrets.SANITY_API_TOKEN }}
sanityPreviewSecret: ${{ secrets.SANITY_STUDIO_PREVIEW_SECRET }}
algoliaAppId: ${{ secrets.ALGOLIA_APP_ID }}
algoliaApiKey: ${{ secrets.ALGOLIA_SEARCH_API_KEY }}
dynatraceEnvironment: ${{ secrets.DYNATRACE_ENVIRONMENT }}
dynatracePaaSToken: ${{ secrets.DYNATRACE_PAAS_TOKEN }}
dynatraceImage: ${{ secrets.DYNATRACE_PREPROD_IMAGE }}
archiveContentLink: ${{ vars.ARCHIVE_CONTENT_LINK }}
environment: ${{ secrets.ENV }}
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()