Skip to content

Commit

Permalink
fix : github action file
Browse files Browse the repository at this point in the history
  • Loading branch information
watchakorn-18k committed Nov 24, 2024
1 parent 81f474f commit c7eef54
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
45 changes: 39 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
name: publish-to-github-pages
on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -11,16 +26,34 @@ jobs:
curl -fsSL https://bun.sh/install | bash
echo "${HOME}/.bun/bin" >> $GITHUB_PATH
- name: Setup Pages ⚙️
uses: actions/configure-pages@v4
with:
static_site_generator: next

- name: Install Dependencies with Bun 🔧
run: bun install

- name : Check Path
run: pwd && ls

- name: Build and Export with Next.js 🏗️
run: bun run next build && bun run next export

- name: Check Build Output
run: ls -la
- name: Build with Next.js using Bun 🏗️
run: pwd && bun run build

- name: Upload artifact 📡
uses: actions/upload-pages-artifact@v3
with:
path: ./out
path: ./build

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
needs: build

steps:
- name: Publish to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { NextConfig } from "next";

const nextConfig: NextConfig = {
/* config options here */
distDir: "build",
output: "export",
reactStrictMode: true,
images: {
Expand Down

0 comments on commit c7eef54

Please sign in to comment.