Compare commits
4
Commits
gh-pages
...
4fc31cc313
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fc31cc313 | ||
|
|
0e7755cdbf | ||
|
|
89ddabcc67 | ||
|
|
03333de65d |
@@ -6,9 +6,10 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
deployments: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
@@ -29,11 +30,7 @@ jobs:
|
||||
# - name: Install pnpm
|
||||
# run: npm install -g pnpm
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build with Next.js
|
||||
run: npm run build
|
||||
|
||||
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v4
|
||||
@@ -59,26 +56,41 @@ jobs:
|
||||
with:
|
||||
name: nextjs-build
|
||||
path: .next/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./out
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: nextjs-build
|
||||
path: .
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./next/.next
|
||||
publish_branch: master # Change this to master if using the master branch for GitHub Pages
|
||||
allow_empty_commit: false
|
||||
keep_files: false
|
||||
force_orphan: false
|
||||
enable_jekyll: false
|
||||
disable_nojekyll: false
|
||||
exclude_assets: .github
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
# deploy:
|
||||
# needs: build
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Download Artifacts
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: nextjs-build
|
||||
# path: .
|
||||
|
||||
# - name: Deploy to GitHub Pages
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# with:
|
||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# publish_dir: ./next/.next
|
||||
# publish_branch: gh-pages # Change this to master if using the master branch for GitHub Pages
|
||||
# allow_empty_commit: false
|
||||
# keep_files: false
|
||||
# force_orphan: false
|
||||
# enable_jekyll: false
|
||||
# disable_nojekyll: false
|
||||
# exclude_assets: .github
|
||||
|
||||
Reference in New Issue
Block a user