Skip to content

Create azure-webapps-node.yml #1

Create azure-webapps-node.yml

Create azure-webapps-node.yml #1

on:
push:
branches: [ "main" ]
workflow_dispatch:
env:
NODE_VERSION: '20.x'
URL: 'https://kibibit.io/phaser-seed'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3.0.1
with:
name: node-app
path: ./dist
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4