-
Notifications
You must be signed in to change notification settings - Fork 124
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
Update sample work flow file in UG #2556
Update sample work flow file in UG #2556
Conversation
Hi @gerteck thanks for the PR! I love the detailed testing :)
|
One thing I want to discuss is the renaming of the default branch. Right now, our documentation uses |
Oh yes, that is definitely true. I could update it across the page and/or documentation. Alternatively, sticking to |
Yup, keeping it as |
Hi @gerteck thanks for the change! |
I was wondering about that, the info box is relevant to some of the other configurations too! Thanks for pointing it out! Roughly around line 40, before |
I encountered a similar issue with the docs of another project. So, it is possible that enabling gh-pages manually wasn't needed when the doc was written but it became necessary later due to a change on GitHub side. Anyway, if it is confirmed as a required step, best to add that into the docs. |
I did some testing regarding this as well, and face the same issue, when deploying via Github Actions for the first time without manually enabling it. However, one workaround I found was to run (I did however, face issue #2547 when doing I searched online, and it seems to be a known issue, and enabling it manually on the repo settings tabs seems to be a required step, although I could not find out the specifics: https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-first-deployment-with-github_token Agree that some information could be added into the docs regarding this, although I am not sure how I would word it specifically. |
Hi @gerteck, Thank you for your detailed research and updates on the GitHub Actions workflow. Your thorough testing and documentation improvements are greatly appreciated. Given your findings, it's clear that manual enabling of GitHub Pages might still be a necessary step for first-time deployments, even though the workflow runs successfully. This is valuable information that should be included in our documentation to prevent confusion for users. I think you can proceed with updating the docs to include this step. You've already done a great job with your research and you'll certainly find an appropriate way to word this in the documentation. |
Manual enabling has been necessary since way back. We have this line in our docs:
When the user does that, he/she will hence enable GitHub pages. This point is also included in our MarkBind Action readme:
But yes, we can improve the docs to highlight this point. |
docs/userGuide/deployingTheSite.md
Outdated
Once you have created the file, commit and push the file to your repo. GitHub Actions should start to build and deploy your MarkBind site. You can verify this by visiting `www.github.com/<org|username>/<repo>/actions`. | ||
Once you have created the file, commit and push the file to your repo. | ||
|
||
For the first deployment on GitHub Pages, you will need to manually configure and enable GitHub Pages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I also realised that it was previously mentioned aboved to manually enable github pages under markbind deploy
. From my MarkBind set up experience, manually enabling GitHub Pages was only necessary for setting up GitHub Actions, but not required when using the command markbind deploy
.
Would it be better to instead add a reminder e.g. If deploying on GitHub Pages for the first time, enable GitHub Pages as per under markbind deploy
, or completely do away with this mention?
I am unsure if this addition would be entirely relevant, as in my setup process, I jumped directly to setting up GitHub Actions instead of first using the markbind deploy
command, which may not be the default expected workflow. I agree that if they ran markbind deploy
, or took note of the above steps, adding this info would be unneccesary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my MarkBind set up experience, manually enabling GitHub Pages was only necessary for setting up GitHub Actions, but not required when using the command markbind deploy.
Yup you are right. I probably had the wrong impression that it needs to be done even for markbind deploy
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, to clarify, when you mention GitHub Actions, do you mean via the following:
name: Deploy MarkBind Site
on:
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
name: test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm i -g markbind-cli
- run: markbind deploy --ci
or using markbind-action ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap! sounds good, thank you!
I was referring to the former:
name: Deploy MarkBind Site on: push: branches: master jobs: build: runs-on: ubuntu-latest name: test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: '16' - run: npm i -g markbind-cli - run: markbind deploy --ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! LGTM on my end
@Tim-Siu Each PR must have a SEMVER impact label, please remember to label the PR properly. |
@all-contributors please add gerteck for code, doc |
I've put up a pull request to add @gerteck! 🎉 |
What is the purpose of this pull request?
Overview of changes:
Resolves #2555
Flips github_token permissons to write contents.
Due to the updating of default GITHUB_TOKEN permissions to read-only (2023), the sample workflow code no longer works out of box without content write permissions to write to
gh-pages
branch.Additionally, renamed default branch toAdded Info box to replacemain
accordingly to make it easier to get started.master
withmain
if applicable.Anything you'd like to highlight/discuss:
Testing instructions:
Tested a few scenarios to try to figure out the least permissive configuration.
Proposed commit message: (wrap lines at 72 characters)
Update Sample Workflow Permissions
Due to the updating of default GITHUB_TOKEN permissions to
read-only, updating of sample workflow code needed to work out
of box. Additionally, branch name has been updated accordingly
to main make it easier to get started.
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major
,r.Minor
,r.Patch
.Breaking change release note preparation (if applicable):