Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existence of a index.md file in the contents repo #33

Open
Cmurilochem opened this issue Apr 17, 2024 · 3 comments
Open

Existence of a index.md file in the contents repo #33

Cmurilochem opened this issue Apr 17, 2024 · 3 comments
Assignees

Comments

@Cmurilochem
Copy link
Contributor

While building a content template repo to be deployed by NEBULA (https://github.com/esciencecenter-digital-skills/NEBULA-content-template) I realised that in order to be able to pass the deploy_with_NEBULA step in the CI/CD we need to have a index.md file in our contents repo.

This is actually the case for research-software-support. I was wondering, is there any reason for this ? I am asking because the file looks quite dummy with (a priori) few important info:

# Hello world

Here is some markdown content.

[Demo lesson link](/lessons/demo)

I suspect that there is something just requiring the file to be there.

@JaroCamphuijsen
Copy link
Collaborator

Hi @Cmurilochem I think indeed that we can get rid of this index.md file in theory. However as you say it is currently necessary to build. Thank your for opening this issue. I agree we should investigate how we can get rid of this file.

@JaroCamphuijsen
Copy link
Collaborator

For me the local rendering works without an index.md file in the root of the content repo. So it should not be necessary. @Cmurilochem did you check where the index.md file is required in the deploy_with_NEBULA workflow?

@Cmurilochem
Copy link
Contributor Author

Thanks @JaroCamphuijsen for the suggestion. This dependency is not directly apparent into the workflow file. This is my deploy_with_Nebula job specs:

  deploy_with_NEBULA:
    needs: get_content_config
    permissions: 
      contents: write
    uses: esciencecenter-digital-skills/NEBULA/.github/workflows/deploy.yml@main
    with:
      config_artifact_name: content_config
      nebula_ref: main

So, to test it, I removed the index.md file from root dir in https://github.com/esciencecenter-digital-skills/NEBULA-content-template and after doing so, I have the following workflow error in the deploy_with_NEBULA job:

Errors prerendering:
[log] [nitro]   ├─ /api/_content/query/brX4CwCJoQ.1714729178686.json (2ms)
  │ ├── Error: [404] Document not found!
  │ └── Linked from /
  │ └── Linked from /NEBULA-content-template/
[log] [nitro]
Error:  Exiting due to prerender errors.
  at prerender (node_modules/nitropack/dist/shared/nitro.0a84349b.mjs:216:11)
  at async node_modules/nuxt/dist/index.mjs:3304:7
  at async build (node_modules/nuxt/dist/index.mjs:4772:5)
  at async Object.run (node_modules/nuxi/dist/chunks/build.mjs:95:5)
  at async Object.run (node_modules/nuxi/dist/chunks/generate.mjs:56:5)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.a9f3bca7.mjs:1648:16)
  at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.a9f3bca7.mjs:1639:11)
  at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.a9f3bca7.mjs:1777:7) 
Error:  Exiting due to prerender errors.
Error: Process completed with exit code 1.

Could this be a requirement from the GitHub pages side ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants