-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.28 KB
/
contentful-image-merge.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
'on':
push:
branches:
- main
paths:
- img-region-select-app/**
- .github/workflows/contentful-image-merge.yml
- .github/workflows/contentful-image-release.yml
- .github/workflows/image-pull-request.yml
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
cd img-region-select-app
npm ci
- name: Set Secrets and Change Dir
run: |
cd img-region-select-app
echo "REACT_APP_CONTENTFUL_SPACE=${{ secrets.STAGING_CONTENTFUL_SPACE }}" >> .env
echo "REACT_APP_CONTENTFUL_CONTENT_DELIVERY_ACCESS_TOKEN=${{ secrets.STAGING_CONTENTFUL_CONTENT_DELIVERY_ACCESS_TOKEN }}" >> .env
- name: Build
run: |
cd img-region-select-app
npm run build
- name: Deploy
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.STAGING_CONTENTFUL_ACCESS_TOKEN }}
CONTENTFUL_ORG_ID: ${{ secrets.STAGING_CONTENTFUL_ORG_ID }}
CONTENTFUL_APP_DEF_ID: ${{ secrets.STAGING_CONTENTFUL_IMAGE_APP_DEF_ID }}
run: |
cd img-region-select-app
npm run upload-ci