Skip to content

update package

update package #3

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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: pnpm
- name: Install Dependencies
run: |
cd dcl-attend-frontend
pnpm install --frozen-lockfile
- name: Setup Pages
uses: actions/configure-pages@v3
with:
static_site_generator: next
- name: Restore Next.js cache
uses: actions/cache@v3
with:
path: dcl-attend-frontend/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('dcl-attend-frontend/**/pnpm-lock.yaml') }}-${{ hashFiles('dcl-attend-frontend/**.[jt]s', 'dcl-attend-frontend/**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('dcl-attend-frontend/**/pnpm-lock.yaml') }}-
- name: Build with Next.js
run: |
cd dcl-attend-frontend
pnpm next build
# - name: Run postbuild script
# run: |
# cd frontend
# pnpm node lib/buildTools/prefixFonts.js
# - name: Export Static HTML with Next.js
# run: |
# cd frontend
# pnpm next export
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dcl-attend-frontend/out
# 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@v2