Skip to content

Commit bf3d190

Browse files
authored
ci: [DX-2273] Add Azure upload workflow (#709)
1 parent 04f619c commit bf3d190

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: deploy-widgetbook-azure
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- optimus_widgetbook/**
9+
- optimus/**
10+
11+
permissions:
12+
id-token: write # This is required for requesting the JWT
13+
contents: read # This is required for actions/checkout
14+
15+
jobs:
16+
deploy_widgetbook_azure:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Azure login
24+
uses: azure/login@v2
25+
with:
26+
client-id: ${{ secrets.AZURE_CLIENT_ID}}
27+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
28+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
29+
30+
- name: Setup Flutter environment
31+
uses: ./.github/actions/setup
32+
33+
- name: Build Web
34+
run: |
35+
melos exec --scope="optimus_widgetbook" -- "flutter build web"
36+
37+
- name: Check build folder
38+
run: |
39+
ls -s optimus_widgetbook/build/web/
40+
41+
- name: Upload to blob storage
42+
uses: azure/CLI@v2
43+
with:
44+
inlineScript: |
45+
az storage blob upload-batch --destination mews-ui-widgetbook --source optimus_widgetbook/build/web --account-name ${{ secrets.AZURE_ACCOUNT_NAME }} --auth-mode login

0 commit comments

Comments
 (0)