Skip to content

Commit ad01b61

Browse files
Merge pull request #191 from AdobeDocs/upload-playground-samples
Add in workflows to upload the playground samples
2 parents 8ba40f4 + 760c92d commit ad01b61

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,32 @@
4949
IMS_BASE_URL_PROD: "https://ims-na1.adobelogin.com"
5050
FFC_BASE_URL_PROD: "https://ffc-addon.adobe.io/"
5151
GATSBY_EXPRESS_URL_PROD: "https://express.adobe.com/new"
52+
53+
upload-playground-samples:
54+
name: Upload Playground Samples
55+
needs: deployment
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Setup Node v20 for Yarn v3
62+
uses: actions/setup-node@v3
63+
with:
64+
node-version: "20.19.5" # Current LTS version
65+
66+
- name: Enable Corepack for Yarn v3
67+
run: corepack enable
68+
69+
- name: Install Dependencies
70+
run: yarn install
71+
72+
- name: Upload playground samples
73+
run: node upload-playground-samples.mjs
74+
env:
75+
IMS_BASE_URL: ${{ inputs.env == 'prod' && 'https://ims-na1.adobelogin.com' || 'https://ims-na1-stg1.adobelogin.com' }}
76+
FFC_BASE_URL: ${{ inputs.env == 'prod' && 'https://ffc-addon.adobe.io/' || 'https://ffc-addon-stage.adobe.io/' }}
77+
PLAYGROUND_CLIENT_ID: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_CLIENT_ID || secrets.PLAYGROUND_CLIENT_ID_STAGE }}
78+
PLAYGROUND_CLIENT_SECRET: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_CLIENT_SECRET || secrets.PLAYGROUND_CLIENT_SECRET_STAGE }}
79+
PLAYGROUND_AUTH_CODE: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_AUTH_CODE || secrets.PLAYGROUND_AUTH_CODE_STAGE }}
80+
PLAYGROUND_API_KEY: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_API_KEY || secrets.PLAYGROUND_API_KEY_STAGE }}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Manual Upload Playground Samples
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
env:
7+
description: "Deploy to (dev|prod)"
8+
required: true
9+
type: choice
10+
options:
11+
- dev
12+
- prod
13+
default: "dev"
14+
jobs:
15+
upload-playground-samples:
16+
name: Upload Playground Samples
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node v20 for Yarn v3
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: "20.19.5" # Current LTS version
26+
27+
- name: Enable Corepack for Yarn v3
28+
run: corepack enable
29+
30+
- name: Install Dependencies
31+
run: yarn install
32+
33+
- name: Upload playground samples
34+
run: node upload-playground-samples.mjs
35+
env:
36+
IMS_BASE_URL: ${{ inputs.env == 'prod' && 'https://ims-na1.adobelogin.com' || 'https://ims-na1-stg1.adobelogin.com' }}
37+
FFC_BASE_URL: ${{ inputs.env == 'prod' && 'https://ffc-addon.adobe.io/' || 'https://ffc-addon-stage.adobe.io/' }}
38+
PLAYGROUND_CLIENT_ID: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_CLIENT_ID || secrets.PLAYGROUND_CLIENT_ID_STAGE }}
39+
PLAYGROUND_CLIENT_SECRET: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_CLIENT_SECRET || secrets.PLAYGROUND_CLIENT_SECRET_STAGE }}
40+
PLAYGROUND_AUTH_CODE: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_AUTH_CODE || secrets.PLAYGROUND_AUTH_CODE_STAGE }}
41+
PLAYGROUND_API_KEY: ${{ inputs.env == 'prod' && secrets.PLAYGROUND_API_KEY || secrets.PLAYGROUND_API_KEY_STAGE }}
42+

0 commit comments

Comments
 (0)