fuwari icon indicating copy to clipboard operation
fuwari copied to clipboard

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

Open oizumi-photoclub opened this issue 2 years ago • 6 comments

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://<my_username>.github.io/", base: "/<my_repo_name>",

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...

oizumi-photoclub avatar Apr 10 '24 09:04 oizumi-photoclub

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 avatar Apr 11 '24 10:04 LibraryLibrarian

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.

LibraryLibrarian avatar Apr 11 '24 11:04 LibraryLibrarian

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

Gintamashiichan avatar May 01 '24 02:05 Gintamashiichan

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.

gtamilvanan17 avatar May 24 '24 11:05 gtamilvanan17

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

3kh0 avatar Oct 23 '24 23:10 3kh0

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.

tubehao avatar Oct 24 '24 09:10 tubehao