Skip to content

Commit

Permalink
other approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobotis committed Sep 9, 2024
1 parent 5770b6d commit f05fc47
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 42 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build, Export and Publish Next.js App
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14.x
- run: |
npm i
npm run build
- name: Next Pages
uses: anorcle/[email protected]
- name: Commit and push changes
run: |
touch .nojekyll
git config --global user.name "hserra"
git config --global user.email "[email protected]"
git add -A
git commit -m "New Build"
git push
27 changes: 0 additions & 27 deletions .github/workflows/deploy.yml

This file was deleted.

Empty file added .nojekyll
Empty file.
13 changes: 5 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ const withNextra = require('nextra')({
themeConfig: './theme.config.jsx',
latex: true
})

module.exports = {
...withNextra(),
images: {
unoptimized: true,
},
output: "export",
};


let nextraConfig = withNextra()
nextraConfig.assetPrefix = './'
module.exports = nextraConfig
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint",
"export": "next build && touch out/.nojekyll",
"deploy": "gh-pages -d out -t true"
},
"dev": "next dev",
"build": "next build && next export",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"next": "^14.2.8",
"nextra": "^2.13.4",
Expand Down

0 comments on commit f05fc47

Please sign in to comment.