Skip to content

Commit

Permalink
Update config
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksander-bi committed May 16, 2024
1 parent cbea50a commit fefd5ad
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_SITE_URL: TEST
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -55,12 +57,12 @@ jobs:
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
# static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
Expand All @@ -74,25 +76,20 @@ jobs:
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
run: echo "${{env.NEXT_PUBLIC_SITE_URL}} && "${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: nextjs-build
path: ./out

# Deployment job
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
# Specify the branch to deploy from
publish_branch: main # Adjust this to your desired branch

0 comments on commit fefd5ad

Please sign in to comment.