Skip to content

Merge pull request #56 from mnahkies/patch-1 #26

Merge pull request #56 from mnahkies/patch-1

Merge pull request #56 from mnahkies/patch-1 #26

Workflow file for this run

name: Deploy website
on:
push:
branches: ['master']
workflow_dispatch:
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
jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./website
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@master
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@main
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Setup Git Configuration
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "hugocxl"
- name: Install dependencies
shell: bash
run: pnpm i --no-frozen-lockfile
- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Build with Next.js
run: pnpm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./website/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