Skip to content

Commit

Permalink
Deploy to Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jannden committed May 30, 2024
1 parent 0dc44db commit 70002aa
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Frontend to Github Pages

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Frontend dependencies
run: |
cd frontend
npm install
- name: Build Frontend Next.js website
run: |
cd frontend
npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/out
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# next.js
/.next
/build
/out

# secrets
.env
Expand Down
1 change: 1 addition & 0 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
module.exports = {
reactStrictMode: true,
swcMinify: true,
output: "export",
};
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"private": true,
"scripts": {
"dev": "next dev -p 4001",
"build": "next build",
"build": "next build && next export",
"start": "next start",
"lint": "next lint",
"compile-contract-types": "typechain --target ethers-v5 --out-dir contracts/types './contracts/*.json'",
Expand Down

0 comments on commit 70002aa

Please sign in to comment.