-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (58 loc) · 2.01 KB
/
Copy pathDEV-web.yaml
File metadata and controls
59 lines (58 loc) · 2.01 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
name: DEV - Build & Deploy equinor.com
on:
workflow_dispatch:
push:
branches:
- staging
paths:
- 'web/**'
- '!web/README.md'
- '!web/.gitignore'
- './FeatureFlags.js'
- '!web/components/README.md'
repository_dispatch:
types: [sanity_publish]
permissions:
id-token: write
packages: write
jobs:
deploy-global-development:
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
FRIENDLYCAPTCHA_SITEKEYS: ${{ vars.FRIENDLYCAPTCHA_SITEKEYS }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Extract sitekey
id: extract
run: |
sitekey=$(echo "$FRIENDLYCAPTCHA_SITEKEYS" | jq -r --arg dataset "${{matrix.dataset}}" '.[] | select(.dataset==$dataset) | .siteKey')
echo "Found sitekey: $sitekey"
echo "sitekey=$sitekey" >> $GITHUB_OUTPUT
- id: deploy-global-development
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 }}
archiveContentLink: ${{ vars.ARCHIVE_CONTENT_LINK }}
environment: ${{ secrets.ENV }}
friendlyCaptchaSitekey: ${{ steps.extract.outputs.sitekey }}
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()