-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.65 KB
/
social.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
name: Create Social Image
on:
workflow_dispatch:
inputs:
documentId:
description: 'Either "settings" or a translation id, for example for norwegian use "settings__i18n_no"'
default: 'settings'
required: true
force:
description: 'Skip the isDifferent check'
type: boolean
required: false
jobs:
build:
name: ${{ github.event.inputs.documentId }}
# runs-on: ubuntu-latest
# Use the macos machine for now as it has the SF font
runs-on: macos-latest
concurrency:
group: ${{ github.event.inputs.documentId }}-${{ github.event.inputs.force }}
cancel-in-progress: true
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: lts/*
- id: cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3
with:
path: |
./blazing-scripts/createSocialImage.js
key: modules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('scripts/*.ts') }}-${{ hashFiles('intl.config.json') }}
- run: npm install --ignore-scripts
if: steps.cache.outputs.cache-hit != 'true'
- run: npm run build:ci
if: steps.cache.outputs.cache-hit != 'true'
- run: npm run ci:createSocialImage ${{ github.event.inputs.documentId }} ${{ github.event.inputs.force }}
env:
SANITY_API_TOKEN: ${{ secrets.SANITY_API_TOKEN }}
SANITY_API_WRITE_TOKEN: ${{ secrets.SANITY_API_WRITE_TOKEN }}
WORKFLOW_DISPATCH_SECRET: ${{ secrets.WORKFLOW_DISPATCH_SECRET }}