Skip to content

WebUI update

WebUI update #37

Workflow file for this run

name: Deploy Software Standards
on:
push:
branches:
- main
env:
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.'
CARGO_TERM_COLOR: always
ACCOUNT_NAME: softwarestandards
PROFILE_NAME: softwarestandardsprofile
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Target
run: rustup target add wasm32-unknown-unknown
- name: Build
run: cargo build
- name: Run Tests
run: cargo test
- name: Install Trunk
run: cargo install trunk
- name: Install Post Build
run: cargo install webapp_post_build --git https://github.com/StoicDreams/RustWebUI
- name: Build Web App
run: |
# Change directory to project folder
cd webapp
# Build
trunk build --release
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Remove Old Files
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob delete-batch -s '$web' --account-name ${{ env.ACCOUNT_NAME }}
- name: Copy Files to Azure Blob Storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage copy -s 'webapp/dist/*' --destination-account-name ${{ env.ACCOUNT_NAME }} --destination-container '$web' --recursive
- name: logout
run: |
az logout
if: always()
purge-storage-cache:
runs-on: ubuntu-latest
needs: build-and-deploy
steps:
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Purge Storage Cache
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge -g ${{ secrets.AZURE_RESOURCE_GROUP }} -n ${{ env.ACCOUNT_NAME }} --profile-name ${{ env.PROFILE_NAME }} --content-paths '/*'
- name: logout
run: |
az logout
if: always()