Skip to content

Netlify deploys sometimes use readme.md as the docs home #1030

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

Closed
guimachiavelli opened this issue Jul 8, 2021 · 3 comments · Fixed by #1360
Closed

Netlify deploys sometimes use readme.md as the docs home #1030

guimachiavelli opened this issue Jul 8, 2021 · 3 comments · Fixed by #1360

Comments

@guimachiavelli
Copy link
Member

guimachiavelli commented Jul 8, 2021

This has happened twice so far:

  1. when manually merging Update faq.md #983 (2021-06-15);
  2. when using Bors to merge Update settings.md #998 (2021-07-08);
  3. in a preview of PR Reference audit: search parameters #1027 (2021-07-12).

In all cases, triggering a re-build (manually via Netlify's web interface or automatically via e.g. a new commit in a PR) fixed the issue.

The first instance of the issue was recorded shortly after we started using Bors in this repo. We are not sure whether this is just a coincidence or if the issue is actually connected to Bors.

Comparing Netlify logs between correct and incorrect deploys doesn't seem to reveal any relevant information: there is a slight variation in the number of generated files, but as far as we can see this type of variation is normal and does not influence the deploy in any way.

@guimachiavelli
Copy link
Member Author

According to an old Vuepress issue, there are cases when a site uses index.md when built in development and readme.md when built in production mode. (thanks, @dichotommy ❤️)

This does sound like what's happening to us. The suggested fix in the thread is to rename readme.md to readme.markdown.

@guimachiavelli guimachiavelli changed the title Netlify deploys sometimes use /learn/contributing/contributing_to_docs.md as the docs home Netlify deploys sometimes use readme.md as the docs home Jul 8, 2021
@guimachiavelli
Copy link
Member Author

guimachiavelli commented Jul 13, 2021

@bidoubiwa suggested this bug might be related to PR #965; more specifically, on line 54 of create/how_to/digitalocean_droplet.md we enclose a couple of words between single quotes. @bidoubiwa's theory is that this might be throwing off vuepress.

That seems like a fairly basic error that vuepress should have accounted for, but it's worth looking into if the above suggested quickfix doesn't solve the issue (change the readme extension).

@bidoubiwa
Copy link
Contributor

There is a solution that might prevent us for ever serving a build that uses readme.md as the landing.
Cypress, a front end testing framework, tests how UI appears on a browser (using browsers executable).

Using the cypress netlify plugin we can cancel the publish when elements of the landing are not appearing on the final build.

it('Contains Welcome message', () => {
  cy.contains(
    "Welcome to the MeiliSearch documentation. Here you'll find everything you need to learn and create with our lightning fast search engine."
  )
})

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

Successfully merging a pull request may close this issue.

2 participants