Trying to get started, encountered this issue: "npm ERR! code EN0ENT" #150
-
This is my first time running a Github action. The first three stages went fine, but in "Install deps and build," I get the error sequence that I've posted below. I'm pretty sure that the problem is on my side, since nobody else is talking about this, but I'd like to confirm before I start to tear things apart. (edited: messed up the formatting originally)
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Sounds like you are trying to run an |
Beta Was this translation helpful? Give feedback.
-
Thank you! That's helped me make a bit more progress. I'm currently trying to upload a pair of .html files contained in the repo
I don't see anything in the code which would produce that address, especially the doubled "neocity/neocity." I don't think that I've organized the repo incorrectly, at least on Github (on my computer, the directory is called neocities rather than neocity, but I don't see how that would affect anything). Right now,
|
Beta Was this translation helpful? Give feedback.
-
Looks like your action isn't checking out the source code of your project, so its not present when the neocities action tries to deploy it. Add the checkout step to your action like this: jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy to neocities
uses: bcomnes/deploy-to-neocities@v1
with:
api_token: $secrets.NEOCITIES_API_TOKEN
cleanup: false
dist_dir: public Hope that helps! Let me know how it goes. |
Beta Was this translation helpful? Give feedback.
Forbidden is neocities rejecting the token. Best I can advise is to try and regenerate the token on neocities and re-enter it. If you have a neocities supporter account I've noticed that the ui can be confusing about which website you are generating tokens for.
Also, if you added the secret to your repo directly, it is now forever in your git history (which is why you never should add secrets to your git repos).
So both circumstances mean you should invalidate your token by making a new one, setting it as a repo secret and trying again after setting the actual yml to pull from it again. The action readme has an example of proper use of secrets to reference.