saicaca / fuwari

✨A static blog template built with Astro.
https://fuwari.vercel.app
MIT License
1.41k stars 326 forks source link

"ERROR: YOUR SITE COULD NOT BE BUILT:" while building Github Pages #39

Open oizumi-photoclub opened 7 months ago

oizumi-photoclub commented 7 months ago

I created a new repository from fuwari template and got an error during build. Here are the changes I made from the template: (lines 25 to 27 of astro.config.mjs) Change before: export default defineConfig({ site: "https://fuwari.vercel.app/", base: "/", After change: export default defineConfig({ site: "https://.github.io/", base: "/",

The error is as follows. image image

Configuration file: none
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
YAML Exception reading /github/workspace/src/pages/archive/category/[category].astro: (<unknown>): mapping values are not allowed in this context at line [12](https://github.com/oizumi-photoclub/homepage/actions/runs/8627340187/job/23648437976#step:4:13) column 19 
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    Invalid YAML front matter in /github/workspace/src/pages/archive/category/uncategorized.astro
Error:  Logging at level: debug GitHub Pages: github-pages v231 GitHub Pages: jekyll v3.9.5 Theme: jekyll-theme-primer Theme source: /usr/local/bundle/gems/jekyll-theme-primer-0.6.0 Requiring: jekyll-github-metadata Requiring: jekyll-seo-tag Requiring: jekyll-coffeescript Requiring: jekyll-commonmark-ghpages Requiring: jekyll-gist Requiring: jekyll-github-metadata Requiring: jekyll-paginate Requiring: jekyll-relative-links Requiring: jekyll-optional-front-matter Requiring: jekyll-readme-index Requiring: jekyll-default-layout Requiring: jekyll-titles-from-headings GitHub Metadata: Initializing... Source: /github/workspace/. Destination: /github/workspace/./_site Incremental build: disabled. Enable with --incremental Generating...
LibraryLibrarian commented 7 months ago

In the standard build of Astro, we introduce a method of publication using our own Github Action. Please try to follow these steps to see if you can publish it on Pages. If it still fails, could you show us the workflow file you used when building the project?

astro標準のビルドでは独自のGithubActionを用いた公開方法を紹介しています。 こちらの手順に従ってPagesに公開出来るか試してみてください。 それでも失敗した場合プロジェクトをビルドする際に使用しているワークフローファイルを見せて頂けますか?

LibraryLibrarian commented 7 months ago

I encountered a similar error when I was building. At that time, the name of the repository set to base was incorrect. It might be related.

Gintamashiichan commented 6 months ago

Same problem, using https://docs.astro.build/en/guides/deploy/github/#deploying-to-a-githubio-url image image Here's some ref for yall: https://stackoverflow.com/questions/77972098/github-jekyll-page-build-keeps-failing

gtamilvanan17 commented 6 months ago

I had the same issue. Luckily astro having their own configs for Github Actions. That helped me to resolve this issue and they are working as expected now.

3kh0 commented 1 month ago

@saicaca seems like this issue is fixed, could we close it?

tubehao commented 4 weeks ago

I encountered the same problem too. I fixed this by changing my repository to another instead of username.github.io and changed the the base in astro.config.mjs, but I still don't understand why this problem happened.