Skip to content

manilpit Committed code for azure blob storage #8

manilpit Committed code for azure blob storage

manilpit Committed code for azure blob storage #8

name: CICD Frontend Dev
run-name: ${{ github.actor }} Committed code for azure blob storage
on:
push:
branches:
- dev
env:
ACCOUNT_NAME: udirdit
SOURCE: dist
DESTINATION: udirdesign-dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn install
- name: Run build script
run: npm run buildDev
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload files to Azure Blob
uses: azure/CLI@v1
with:
azcliversion: 2.48.1
inlineScript: |
az storage blob upload-batch --account-name ${{ env.ACCOUNT_NAME }} \
--auth-mode key -s ${{ env.SOURCE }} -d ${{ env.DESTINATION }} --overwrite
# Azure logout - Force step to always run with 'always()', ensures no hanging logins
- name: logout
if: always()
run: |
az logout