Comments (7)
Thanks for the report, @TimPietrusky!
Do you happen to have a public repo available where you're running into this issue? ๐ค We haven't seen this behavior ourselves as far as I know, but definitely open to expanding our internal end-to-end tests if we're missing something. ๐๐ป
- Update the comment in the provided workflow (
nextjs.yml
) to make sure that user know that this can be done (but I guess this is not the scope of this repo, pease let me know where this should be fixed)
The Next.js starter workflow template that GitHub suggests can be found in the actions/starter-workflows
repo:
actions/starter-workflows
@pages/nextjs.yml
from configure-pages.
One debugging step that would also help is to check what Pages site URL is being detected by the Action. This would help narrow down if the issue is in the values returned by the Pages REST API, a bug in our injection code, or some incompatibility between your Next.js config and our injection code.
To debug, update your Actions workflow with a few changes like the following:
# Find your existing step for this, then add an `id` property
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
with:
static_site_generator: next
- name: Dump Pages configuration
run: |
echo PAGES_BASE_URL: ${{ steps.pages.outputs.base_url }}
echo PAGES_ORIGIN: ${{ steps.pages.outputs.origin }}
echo PAGES_HOST: ${{ steps.pages.outputs.host }}
echo PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }}
Although I'd like to fix whatever issue you're running into, it's probably also worth mentioning that you could probably use the aforementioned outputs
values as a short-term workaround to, say, set environment variables for the duration of the workflow run that could then be used within your next.config.js
when building/exporting your Next.js site. ๐ก
from configure-pages.
ok
from configure-pages.
@JamesMGreene thanks for your message!
The public repo where I was running into this is: https://github.com/iieinander/iieinander.band
Is there anything else that you need?
from configure-pages.
@TimPietrusky What I'm seeing in your Actions logs would suggest that the basePath
is being set to ""
, which is the expected value for Next.js when there isn't any notable base path (trailing slashes are excluded). ๐ค
https://github.com/iieinander/iieinander.band/actions/runs/4173980364/jobs/7226978361#step:5:58
Extra line breaks added for legibility:
Found configuration object in indirect module export
Injection successful, new configuration:
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {unoptimized: true},
experimental: {images: {unoptimized: true}},
basePath: "",
reactStrictMode: true,
swcMinify: true,
};
module.exports = nextConfig;
from configure-pages.
@JamesMGreene yes, this is true, but only because I'm using my fork. When I used the original action, the basePath
was set:
https://github.com/iieinander/iieinander.band/actions/runs/4166191535/jobs/7210202546#step:5:58
const nextConfig = {
images: {unoptimized: true},experimental: {images: {unoptimized: true}},basePath: "/iieinander.band",reactStrictMode: true,
swcMinify: true,
};
In my fork TimPietrusky@f294021, I commented out the basePath
, so it's never set.
from configure-pages.
Noting that we ran into this same issue at https://github.com/CodeWithAloha/CWAWebsite, more info at CodeWithAloha/website#51
from configure-pages.
Related Issues (20)
- New configure
- Supported configuration file extension check does not use the per-generator default HOT 6
- Set `$BASE_URL` or similar env var for subsequent steps HOT 2
- Doesn't recognize next.config.mjs HOT 11
- Default configuration for next js needs to be updated HOT 2
- Major v5 HOT 4
- Zerea
- 35 HOT 2
- name: Static Analysis on: [push, pull_request] jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: WillAbides/[email protected] with: go-version: '1.16.x' - name: Get dependencies run: | sudo apt-get update && sudo apt-get install gcc libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev xorg-dev go install golang.org/x/tools/cmd/goimports@latest go install github.com/fzipp/gocyclo/cmd/gocyclo@latest go install golang.org/x/lint/golint@latest go install honnef.co/go/tools/cmd/[email protected] - name: Cleanup repository run: rm -rf vendor/ - name: Vet run: go vet -tags ci ./... HOT 1
- ะะฟ HOT 1
- Wrong! Rename main.js to index.js
- Add note to include `deployment` as typical trigger when using this action? HOT 2
- Create Pages site failed: Resource not accessible by integration HOT 15
- Configuration seems to struggle with Next.js PWA configurations HOT 4
- Incorrect link "all code changes" for v3.0.0 release HOT 1
- Proxy issues when using self-hosted runners HOT 1
- The action ignores .ts config and creates default nuxt.config.js HOT 6
- thank u
- Add support for generating `preview: true` deployment environment URLs? ๐งช HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configure-pages.