Skip to content

finally a good README #45

finally a good README

finally a good README #45

Workflow file for this run

name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'pnpm'
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.formswizard/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-formswizard-${{ hashFiles('**/pnpm-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-formswizard-${{ hashFiles('**/pnpm-lock.json') }}-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build
run: |
export NODE_OPTIONS=--max_old_space_size=8193
pnpm build
- name: Collect static pages
run: pnpm build:pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1