-
Notifications
You must be signed in to change notification settings - Fork 8
98 lines (93 loc) · 3.17 KB
/
DEV-studio-v3.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: DEV - Build & deploy studio v3
on:
workflow_dispatch:
push:
branches:
- staging
paths:
- 'sanityv3/**/*'
- './FeatureFlags.js'
- '!./README.md'
- '!./.env.development.template'
permissions:
id-token: write
packages: write
jobs:
check-code:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
ref: staging
- name: Install pnpm 📦
id: install-pnpm
uses: pnpm/action-setup@v2
with:
version: '^8.5.1'
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies 🔧
id: install-dependencies
run: pnpm sanityv3 install
# @TODO: Enable ESlint for v3
# - name: Run ESLint 🔎
# id: lint
# run: |
# pnpm lint:studio
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()
deploy-studio:
needs: check-code
runs-on: ubuntu-latest
environment:
name: development
url: https://studiov3-global-development-energyvision-dev.radix.equinor.com/
strategy:
matrix:
dataset: [global-development]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
DOCKER_BUILDKIT: 1
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- id: deploy-satellite
uses: ./.github/workflows/deploy-v3/
with:
imageName: ghcr.io/equinor/energyvision/studiov3-${{ matrix.dataset }}
datasetName: ${{ matrix.dataset }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
sanityApiToken: ${{ secrets.SANITY_API_TOKEN }}
sanityMutationToken: ${{ secrets.SANITY_STUDIO_MUTATION_TOKEN }}
sanityPreviewToken: ${{ secrets.SANITY_STUDIO_PREVIEW_SECRET }}
brandmasterUrl: ${{ secrets.SANITY_STUDIO_BRANDMASTER_URL }}
brandmasterPluginSource: ${{ secrets.SANITY_STUDIO_BRANDMASTER_PLUGIN_SOURCE }}
fotowareClientId: ${{ secrets.SANITY_STUDIO_FOTOWARE_CLIENT_ID }}
fotowareTenantUrl: ${{ secrets.SANITY_STUDIO_FOTOWARE_TENANT_URL }}
fotowareRedirectOrigin: ${{ secrets.SANITY_STUDIO_FOTOWARE_REDIRECT_ORIGIN }}
fotowareAfExportUrl: ${{ secrets.SANITY_STUDIO_FOTOWARE_AF_EXPORT_URL }}
fotowareAfExportKey: ${{ secrets.SANITY_STUDIO_FOTOWARE_AF_EXPORT_KEY }}
screen9accountId: ${{ secrets.SANITY_STUDIO_SCREEN9_ACCOUNT_ID }}
screen9token: ${{ secrets.SANITY_STUDIO_SCREEN9_TOKEN }}
environment: ${{ secrets.ENV }}
- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()