Skip to content
New issue

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

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

Already on GitHub? # to your account

[update] new hints in the example of github-pages.md #1979

Merged
merged 5 commits into from
Feb 15, 2023
Merged

[update] new hints in the example of github-pages.md #1979

merged 5 commits into from
Feb 15, 2023

Conversation

NatLee
Copy link
Contributor

@NatLee NatLee commented Feb 14, 2023

There are some issues with this document.

Check List

Please read and check followings before submitting a PR.

  • I want to publish my theme on Hexo official website.
    • I have read the theme publishing doc.
    • name is unique.
    • link URL is correct.
    • preview URL is correct.
    • preview URL web site is rendered correctly.
    • Add a screenshot to source/themes/screenshots.
    • Screenshot filename is same as value of name.
    • Screenshot size is 800 * 500.
    • Screenshot file format is png.
  • I want to publish my plugin on Hexo official website.
  • Others (Update, fix, translation, etc...)
    • Languages:
    • en English
    • ru Russian
    • zh-cn simplified Chinese
    • zh-tw traditional Chinese

Note

No need to translate ko, pt-br, th languages if you submit a PR for documentation.

Warning

ko, pt-br, th languages document are inactive. Please, submit issue if you want to continuous contribution to them.

There are some issues with this document.

- Github do not support the name of token starting with `GITHUB_` now.
- The name of `token` in the `pages.yml` is ambiguous. User may check the usage of actions.
@github-actions
Copy link
Contributor

Theme name validation passed.
Theme thumbnails validation completed.

@renbaoshuo
Copy link
Member

The GITHUB_TOKEN is a special token that is created automatically for each workflow run.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret

@renbaoshuo renbaoshuo closed this Feb 15, 2023
@renbaoshuo renbaoshuo reopened this Feb 15, 2023
@renbaoshuo
Copy link
Member

Sorry, I clicked the "Close Pull Request" button by mistake.

@stevenjoezhang
Copy link
Member

See also github/docs#12095 (comment)

@NatLee
Copy link
Contributor Author

NatLee commented Feb 15, 2023

@renbaoshuo Thanks for your fast response!

I have trid to use the token starts with GITHUB_ in actions.

image

But, I got a failed message below

image

In my opion, we need to change the name of token in the document or they may confuse the user.

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Feb 15, 2023

The token named secrets.GITHUB_TOKEN is created automatically. You don't need to create it.
You just need to follow the steps in github-pages.md, it should not throw any errors.

@NatLee
Copy link
Contributor Author

NatLee commented Feb 15, 2023

@stevenjoezhang Thanks!

I followed the step here https://hexo.io/zh-tw/docs/github-pages.html and created a new repo to test the workflows.

In the stage of deployment, it showed error of 403:

image

@stevenjoezhang
Copy link
Member

截屏2023-02-15 15 55 50

It is working in my repository... Maybe you can refer to peaceiris/actions-gh-pages#744

Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just blocking the pull request as the change requires further discussion/investigation.

@NatLee
Copy link
Contributor Author

NatLee commented Feb 15, 2023

@stevenjoezhang Thanks!

In that reference, we need to switch the setting in actions.

image

I find there is another way to give writting permission. -> peaceiris/actions-gh-pages#753

Just add permissions in the .yml.

jobs:
  pages:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    ...

@renbaoshuo renbaoshuo requested a review from SukkaW February 15, 2023 11:56
@SukkaW SukkaW merged commit c06f335 into hexojs:master Feb 15, 2023
@NatLee NatLee deleted the patch-1 branch February 15, 2023 18:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants