twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
13.27k stars 493 forks source link

Several website URLs appear to be broken #2525

Closed bradenhilton closed 1 year ago

bradenhilton commented 1 year ago

Describe the bug

The following URLs show 404 - Not found:

  1. https://www.chezmoi.io/ - The main URL
  2. https://www.chezmoi.io/index.md - From Home in the navigation
  3. https://www.chezmoi.io/reference/configuration-file/variables.md - Reference -> Configuration File -> Variables
  4. https://www.chezmoi.io/reference/release-history.md - Reference -> Release history
  5. https://www.chezmoi.io/links/articles-podcasts-and-videos.md - From Links in the navigation

To reproduce

Visit any of the URLs above.

Expected behavior

The URLs should not show a 404 error.

Output of command with the --verbose flag

NA.

Output of chezmoi doctor

NA.

Additional context

NA.

twpayne commented 1 year ago

Thanks for reporting this! I think the deploy-website step of the release process failed. I'll investigate.

In the short term I've run cd assets/chezmoi.io && mkdocs gh-deploy to redeploy the website, and it seems to be working again now.

bradenhilton commented 1 year ago

Just refreshed and can confirm everything looks okay now.

bradenhilton commented 1 year ago

https://github.com/twpayne/chezmoi/commit/d6da479e158236e14c584f5a0e915c70bf3c8370 "updated" cpina/github-action-push-to-another-repository to commit 940a285, which is from 2021-04-29T21:45:48Z.

Before this, the build-website job for v2.25.0 used https://github.com/cpina/github-action-push-to-another-repository/commit/9e487f29582587eeb4837c0552c886bb0644b6b9, which is the latest commit at time of posting.

bradenhilton commented 1 year ago

Here is the comparison: https://github.com/cpina/github-action-push-to-another-repository/compare/940a2857e598a6392bd336330b07416c1ae8ea1f...9e487f29582587eeb4837c0552c886bb0644b6b9

twpayne commented 1 year ago

Thanks for the investigation. The failure for https://chezmoi.io occurs in the push-chezmoi.io step (logs). A few things are going wrong here:

  1. chezmoi uses Go templates to generate several Markown pages for the website, which uses MkDocs.
  2. Go isn't installed in the job, so these steps fail, leading to missing Markdown pages.
  3. MkDocs silently ignores the failures, and pushes the broken website.

The problems with push-get.chezmoi.io are due to a missing access token.

halostatue commented 1 year ago

@twpayne There is one other change in the action which may be actionable, because the branch default changed from master to main, here.

halostatue commented 1 year ago

The remaining changes are large but mostly harmless from what I can tell. I don’t know whether the configuration change would affect chezmoi.

bradenhilton commented 1 year ago

The problems with push-get.chezmoi.io are due to a missing access token.

@twpayne If you're referring to the error message /entrypoint.sh: line 32: API_TOKEN_GITHUB: parameter not set, I don't believe this is the case.

Per

https://github.com/cpina/github-action-push-to-another-repository/blob/9e487f29582587eeb4837c0552c886bb0644b6b9/entrypoint.sh#L48-L55

you can pass either API_TOKEN_GITHUB or SSH_DEPLOY_KEY, and we pass SSH_DEPLOY_KEY:

Run cpina/github-action-push-to-another-repository@940a2857e598a6392bd336330b07416c1ae8ea1f
  with:
    ...
  env:
    ...
    SSH_DEPLOY_KEY: ***
/usr/bin/docker run ... -e "SSH_DEPLOY_KEY" ...
bradenhilton commented 1 year ago

@halostatue The build-website job for v2.25.0 already used https://github.com/cpina/github-action-push-to-another-repository/commit/9e487f29582587eeb4837c0552c886bb0644b6b9: (link) and I don't recall the website breaking.

bradenhilton commented 1 year ago

Just to further confirm this, note the output and compare it to the echos from each commit:

v2.25.0 release

build-website job output:

...
[+] Action start
[+] Using SSH_DEPLOY_KEY
# github.com:22 SSH-2.0-babeld-f33ee42f
# github.com:22 SSH-2.0-babeld-f33ee42f
# github.com:22 SSH-2.0-babeld-f33ee42f
# github.com:22 SSH-2.0-babeld-f33ee42f
# github.com:22 SSH-2.0-babeld-f33ee42f
[+] Git version
git version 2.36.2
[+] Cloning destination git repository get.chezmoi.io
...

entrypiont.sh@9e487f:

...
echo "[+] Action start"
...
echo "[+] Using SSH_DEPLOY_KEY"
...

v2.26.0 release

build-website job output:

...
Starts
Cloning destination git repository
/entrypoint.sh: line 32: API_TOKEN_GITHUB: parameter not set

entrypiont.sh@940a28:

...
echo "Starts"
...
echo "Cloning destination git repository"
...