Skip to content
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 docs to include GitHub Actions #245

Open
rostyk-begey opened this issue Mar 24, 2022 · 6 comments
Open

Update docs to include GitHub Actions #245

rostyk-begey opened this issue Mar 24, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@rostyk-begey
Copy link

Hello there! 👋

I've been working on GitHub Actions configuration for my project and I've spent pretty much time figuring out why I'm getting npm ENEEDAUTH error.

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.yarnpkg.com/
npm ERR! need auth You need to authorize this machine using npm adduser

But after, I've found this comment in publishment.yml that helped me to solve this issue.

Use npx instead of yarn because yarn automagically sets NPM_* environment variables
like NPM_CONFIG_REGISTRY so npm publish ends up ignoring the .npmrc file
which is set up by setup-node action.

I think it would be really helpful to have GitHub Actions sample configuration in docs (I know there is one for CircleCI).
Or at least include that comment to CI/CD section in docs.

Besides that, I'm really grateful for this tool!

@dianjuar
Copy link
Member

Definitely!

I'll add some documentation about the CI configuration on GitHub Action. The best documentation about that is currently the publishment workflow of ngx-deploy-npm.

I was thinking of adding it someday. Thank you for bringing opening this issue.

@dianjuar
Copy link
Member

I'll leave this open issue and close it when the correspondent PR gets merged.

@dianjuar
Copy link
Member

@rostyk-begey This post can help you in the creation of your ci pipeline. Improve your Workflow execution time by 32% ⚡

That post results from the effort put into building the ngx-deploy-npm ci pipeline.

@dianjuar dianjuar added the documentation Improvements or additions to documentation label Mar 28, 2022
@dianjuar dianjuar added the good first issue Good for newcomers label Jun 14, 2022
@dianjuar
Copy link
Member

dianjuar commented Jun 14, 2022

@rostyk-begey I marked this issue as "Good First Issue".

I believe it's an excellent opportunity for new contributors, and you seem to have experience with it.
Don't you like to make a PR?

My dm's are open on Twitter and Telegram if you prefer private support.

@danielnaranjo
Copy link

@dianjuar Is this a package hosted on NPM or GitHub? I think line #62 asks for authentication to registry yarn. You need to add .npmrc or .yrc file to define your master user.

Here is an example:

.yarnrc

registry "https://registry.npmjs.org"
"@YOURUSERNAME" "https://npm.pkg.github.com/YOURUSERNAME"

.npmrc

always-auth = true
@YOURUSERNAME:registry=https://npm.pkg.github.com/
registry=https://npm.pkg.github.com/@YOURUSERNAME
//npm.pkg.github.com/:_authToken=YOURTOKEN
registry=https://registry.npmjs.org/

@dianjuar
Copy link
Member

dianjuar commented Jul 8, 2022

@danielnaranjo It's hosted on NPM. The line #62 is just to verify beforehand that the NPM configuration is in place.

image


The file generation that you are mentioning is already handled on the set-up action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants