Skip to content

Merge pull request #52 from AustrianDataLAB/feature/51-frontend-user-… #126

Merge pull request #52 from AustrianDataLAB/feature/51-frontend-user-…

Merge pull request #52 from AustrianDataLAB/feature/51-frontend-user-… #126

Workflow file for this run

name: Frontend CI
on:
push:
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend/vue-gewoscout
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/vue-gewoscout/package-lock.json
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npx vitest --reporter=junit --outputFile=test-output.xml
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: |
frontend/vue-gewoscout/test-output.xml
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend/vue-gewoscout
timeout-minutes: 2
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/vue-gewoscout/package-lock.json
- name: Install Dependencies
run: npm ci
- name: Build Frontend
run: npm run build
- name: Copy Static Web App Config
run: cp staticwebapp.config.json dist/staticwebapp.config.json
- name: Build And deploy to Development
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.SWA_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
skip_app_build: true
app_location: "frontend/vue-gewoscout/dist" # App source code path
deployment_environment: Development