Skip to content

Updated deploy process and some config #28

Updated deploy process and some config

Updated deploy process and some config #28

name: build-and-deploy
on:
push:
branches:
- main
jobs:
build-and-test:
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install and Build
run: |
npm install
npm run build
env:
MODE: production
- name: Test
run: npm test
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: './app'
deploy:
needs: build-and-test
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3