Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Adds github action to deploy to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Gebec committed Sep 20, 2023
1 parent f64559d commit ff213c5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Node.js CI

on:
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run lint
- name: Next.js build
run: npm run build
- name: Static HTML export
run: next export
- name: Artifacts upload
uses: actions/upload-pages-artifact@v2
with:
path: ./out

# Github pages deployment
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

0 comments on commit ff213c5

Please sign in to comment.