Skip to content

Add Vite-powered GitHub Pages postcode search interface #1

Add Vite-powered GitHub Pages postcode search interface

Add Vite-powered GitHub Pages postcode search interface #1

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build postcode database
run: yarn build
- name: Build web app
run: yarn build:web
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v4
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: "./dist"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false