Merge pull request #515 from DorijanH/feature/nextjs-app-router #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Deploy to GitHub Pages | |
# Triggering the workflow on any push to the 'main' branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Deploy job | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Installing pnpm | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: latest | |
# Defining what Node.js version to use | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: pnpm | |
cache-dependency-path: ./pnpm-lock.yaml | |
# Installing node dependencies using pnpm | |
- name: Pnpm install | |
run: pnpm install --frozen-lockfile | |
# Generating .env.local file | |
- name: Generating .env.local file | |
run: cp .env.local.example .env.local | |
# Exporting NextJS static files | |
- name: Export static files | |
run: pnpm export | |
# Deploying the static page to GitHub Pages | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: out |