Skip to content

Commit

Permalink
Merge pull request #4 from Flopsky/Flopsky-patch-3
Browse files Browse the repository at this point in the history
Update nextjs.yml
  • Loading branch information
Flopsky authored Dec 31, 2023
2 parents e3c5e9f + d965f5c commit 8104fc8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -74,23 +75,23 @@ 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: ${{ steps.detect-package-manager.outputs.runner }} next build && ${{ steps.detect-package-manager.outputs.runner }} next export
# If you encounter issues with the build step, add a specific command to create the output directory:
# - name: Create output directory
# run: mkdir -p ./out
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-artifact@v2
with:
name: github-pages
path: ./out

# Deployment job
deploy:
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:
# Set the repository name for deployment
repository_name: Flopsky.github.io

0 comments on commit 8104fc8

Please sign in to comment.