Skip to content

Fixed test sample

Fixed test sample #31

Workflow file for this run

name: Deploy WebApp
on:
push:
paths:
- webApp/**
- .github/workflows/**
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use NodeJS 20
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Resotre
run: npm install
working-directory: webApp
- name: Build
run: npm run release
working-directory: webApp
- name: Test
run: npm run test
working-directory: webApp
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
# Path of the directory containing the static assets.
path: webApp/build
retention-days: 3
release:
needs: build
name: Deploy to GitHub Pages (Release)
runs-on: ubuntu-latest
if: github.ref_name == 'dev'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2
test-env:
needs: build
name: Deploy to Test Environment
runs-on: ubuntu-latest
if: github.ref_name != 'dev'
environment:
name: test-environment
url: https://billpathwebapptest.z6.web.core.windows.net/
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: github-pages
- name: Extract Artifact
run: |
mkdir billpath
tar --extract --file artifact.tar --directory billpath
- name: Deploy
uses: bacongobbler/azure-blob-storage-upload@main
with:
source_dir: billpath
account_name: billpathwebapptest
container_name: $web
sas_token: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
sync: true