Skip to content

Commit c2eba02

Browse files
committed
merge from origin/main
2 parents d0f3fa2 + 6d38cb2 commit c2eba02

File tree

192 files changed

+1238
-1086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+1238
-1086
lines changed

.github/workflows/pr-chat.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ jobs:
3434
shell: bash
3535
run: |
3636
cp samples/react-contoso/.env.sample samples/react-contoso/.env
37-
sed -i 's|REACT_APP_CLIENT_ID="00000000-0000-0000-0000-000000000000"|REACT_APP_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT}}"|g' samples/react-contoso/.env
38-
sed -i 's|REACT_APP_BACKEND_CLIENT_ID="00000000-0000-0000-0000-000000000000"|REACT_APP_BACKEND_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT_BACKEND}}"|g' samples/react-contoso/.env
37+
sed -i 's|REACT_APP_CLIENT_ID="ed072e38-e76e-45ae-ab76-073cb95495bb"|REACT_APP_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT}}"|g' samples/react-contoso/.env
3938
sed -i 's|REACT_APP_BASE_DIR="/"|REACT_APP_BASE_DIR="/next/mgt-chat"|g' samples/react-contoso/.env
4039
4140
- name: Build 🛠

.github/workflows/pr-clean-storybook.yml renamed to .github/workflows/pr-clean-deployments.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Clean pr storybook
4+
name: Clean pr deployments
55

66
on:
77
pull_request:
@@ -30,5 +30,29 @@ jobs:
3030
git config user.name github-actions
3131
git config user.email [email protected]
3232
git rm -r next/pr/${{ github.event.number }}
33-
git commit -m "PR ${{ github.event.number }} closed"
33+
git commit -m "PR ${{ github.event.number }} closed - remove storybook"
34+
git push
35+
36+
react-contoso:
37+
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
38+
runs-on: ubuntu-latest
39+
40+
strategy:
41+
matrix:
42+
node-version: [18.x]
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
ref: gh-pages
48+
- name: Use Node.js ${{ matrix.node-version }}
49+
uses: actions/setup-node@v1
50+
with:
51+
node-version: ${{ matrix.node-version }}
52+
registry-url: 'https://registry.npmjs.org'
53+
- run: |
54+
git config user.name github-actions
55+
git config user.email [email protected]
56+
git rm -r next/sample/pr/${{ github.event.number }}
57+
git commit -m "PR ${{ github.event.number }} closed - remove react-contoso"
3458
git push

.github/workflows/pr-storybook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
- name: Comment PR
6060
uses: thollander/actions-comment-pull-request@v1
6161
with:
62-
message: 'The updated storybook is available [here](https://mgt.dev/next/pr/${{ github.event.number }})'
62+
message: '📖 The updated storybook is available [here](https://mgt.dev/next/pr/${{ github.event.number }})'
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-test-app.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Deploy react-contoso sample app for PR
5+
6+
on:
7+
pull_request:
8+
types: [opened, labeled, synchronize, reopened]
9+
branches: [main, release/**, next/**]
10+
11+
jobs:
12+
react-contoso:
13+
if: "contains(github.event.pull_request.labels.*.name, 'Build: React Contoso')"
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [18.x]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
registry-url: 'https://registry.npmjs.org'
27+
28+
- name: Install deps 🛠
29+
run: |
30+
echo "installing deps for packages"
31+
yarn
32+
33+
- name: Setup env file
34+
shell: bash
35+
run: |
36+
cp samples/react-contoso/.env.sample samples/react-contoso/.env
37+
sed -i 's|REACT_APP_CLIENT_ID="ed072e38-e76e-45ae-ab76-073cb95495bb"|REACT_APP_CLIENT_ID="${{secrets.REACT_CONTOSO_CHAT}}"|g' samples/react-contoso/.env
38+
sed -i 's|REACT_APP_BASE_DIR="/"|REACT_APP_BASE_DIR="/next/sample/pr/${{ github.event.number }}"|g' samples/react-contoso/.env
39+
40+
- name: Build 🛠
41+
run: |
42+
yarn build
43+
yarn build:react-contoso
44+
45+
- name: Deploy mgt.dev/sample/pr/${{ github.event.number }} 🚀
46+
uses: JamesIves/[email protected]
47+
with:
48+
branch: gh-pages
49+
folder: samples/react-contoso/build
50+
target-folder: next/sample/pr/${{ github.event.number }}
51+
52+
- name: Comment PR
53+
uses: thollander/actions-comment-pull-request@v1
54+
with:
55+
message: '🚀 New react-contoso sample application deployed [here](https://mgt.dev/next/sample/pr/${{ github.event.number }})'
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/storybook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
folder: storybook-static
4242
target-folder: next
4343
clean-exclude: |
44+
sample
4445
pr
4546
v3
4647
mgt-chat
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)