We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9acdafb commit 2918addCopy full SHA for 2918add
.github/workflows/deploy.yml
@@ -0,0 +1,36 @@
1
+name: Deploy Next.js to GitHub Pages
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main # or your default branch
7
8
+permissions:
9
+ contents: write # needed to push to gh-pages branch
10
11
+jobs:
12
+ build-deploy:
13
+ runs-on: ubuntu-latest
14
15
+ steps:
16
+ - name: ⬇️ Checkout code
17
+ uses: actions/checkout@v3
18
19
+ - name: ⚙️ Set up Node.js
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: 18
23
24
+ - name: 📦 Install dependencies
25
+ run: npm install
26
27
+ - name: 🛠 Build & export static site
28
+ run: |
29
+ npm run build
30
+ npx next export
31
32
+ - name: 🚀 Deploy to GitHub Pages
33
+ uses: peaceiris/actions-gh-pages@v3
34
35
+ github_token: ${{ secrets.GITHUB_TOKEN }}
36
+ publish_dir: ./out
0 commit comments