Skip to content

Add Github Pages workflow #1

Add Github Pages workflow

Add Github Pages workflow #1

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
# Enable this workflow manually from the Github Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID }}
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }}
steps:
- name: Get files
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "pnpm"
- name: Install packages
run: pnpm install
- name: Export static files
run: pnpm run build
- name: Add .nojekyll file
run: touch ./out/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: out