From 3196b44be6f20b5b68351e83e79d338f58624eda Mon Sep 17 00:00:00 2001 From: Neil Kalman Date: Wed, 4 Sep 2024 13:56:17 +0300 Subject: [PATCH] Create azure-webapps-node.yml --- .github/workflows/azure-webapps-node.yml | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/azure-webapps-node.yml diff --git a/.github/workflows/azure-webapps-node.yml b/.github/workflows/azure-webapps-node.yml new file mode 100644 index 0000000..f7b3369 --- /dev/null +++ b/.github/workflows/azure-webapps-node.yml @@ -0,0 +1,49 @@ +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