Skip to content

Re-arrange Github Actions yaml #392

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

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Re-arrange Github Actions yaml #392

merged 2 commits into from
Feb 4, 2021

Conversation

joelachance
Copy link
Collaborator

Remove ticks around hugoVersion, re-arranges values to match the docs

Remove ticks around hugoVersion, re-arranges values to match the docs
@joelachance
Copy link
Collaborator Author

I think we're going to need to add PERSONAL_TOKEN to the secrets, but I'm not sure what that's supposed to be just yet. I need to look into that.

@mattip
Copy link
Member

mattip commented Feb 3, 2021

Did you see https://github.com/peaceiris/actions-hugo#%EF%B8%8F-create-your-workflow which does not use docker?

@joelachance
Copy link
Collaborator Author

I did! We were using that action previously before the first merge in this group. I wasn't finding any config to push to a different repository, so I was going for the easiest thing. We could stick with the peaceiris action, but we may need a token anyway to push the built code into a new repo, right?

@mattip
Copy link
Member

mattip commented Feb 3, 2021

Can we create a org-wide token that works in both repos?

@joelachance
Copy link
Collaborator Author

Ok, two things, @mattip @rgommers:

  1. I removed siteDir. I don't think we need it since it builds into the root directory (i think?)
  2. I added a personal access token from my account. it only has org permissions, nothing else. There's no way to generate an org token from what I've been finding online, it's not a thing for some reason.

It seems it made it past the githubToken error and died on attempting to cd into the siteDir, so I'm hoping these changes will work.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

There's no way to generate an org token from what I've been finding online, it's not a thing for some reason.

Indeed. I believe the other way to do this is to create a dummy user (e.g., numpy-deploy-bot) and use that for such purposes. But it doesn't matter too much, happy to go with your token.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @joelachance, let's give this a try.

@rgommers rgommers merged commit 876e268 into master Feb 4, 2021
@rgommers rgommers deleted the bug/391-gh-actions branch February 4, 2021 17:22
@joelachance
Copy link
Collaborator Author

Sounds good! I don't mind, if something weird comes up and we need to change the token, i don't see that being a big problem.
Hopefully this works 🤞

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

Still failing:

remote: Permission to numpy/numpy.github.com.git denied to joelachance.

Let me check that now.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

Hmm, you have write access and there's no branch protection rules on that repo. So it should have worked. That's the second time, after @mattip not being able to merge PRs on this repo. Not sure what is wrong.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

Ah, understood Matti's issue. Apparently permissions changed, this now requires full admin permission:

Merge pull requests on protected branches, even if there are no approving reviews

@mattip next time if you approve first, you should be able to merge I believe.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

I enabled branch protection on the numpy.github.com repo, requiring linear history, and upgraded @joelachance's permissions from "write" to "maintainer" - I think that should fix it.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

Same thing again, didn't fix the push permissions. I'll try a bit more.

@rgommers
Copy link
Member

rgommers commented Feb 4, 2021

Okay I changed to token to one I generated, and that fixed it.

MarsBarLee pushed a commit to MarsBarLee/numpy.org that referenced this pull request Feb 16, 2021
* Re-arrange Github Actions yaml

Remove ticks around hugoVersion, re-arranges values to match the docs

* Remove siteDir from Github Actions
@rgommers rgommers mentioned this pull request Apr 24, 2021
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

Successfully merging this pull request may close these issues.

3 participants