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

Setup CI to avoid committing locally built files #114

Open
qchenevier opened this issue Jul 12, 2020 · 3 comments
Open

Setup CI to avoid committing locally built files #114

qchenevier opened this issue Jul 12, 2020 · 3 comments

Comments

@qchenevier
Copy link
Contributor

qchenevier commented Jul 12, 2020

That s a good idea @qchenevier ! We do have a travis.yml, is it just a matter of adding the npm run build command here? I m curious to know whether it will also create a commit for the file(s) built. Coz we need the transpiled file(s) committed [for npm publish as well as CDNjs autoupdate which kicks in for npm publish]

Originally posted by @walmik in #111 (comment)

@qchenevier
Copy link
Contributor Author

It seems less obvious to do than I thought. Here are some interesting content:

I'm investigating how to do that, but since I'm a beginner with travis CI, any help is welcomed.

@qchenevier
Copy link
Contributor Author

@qchenevier
Copy link
Contributor Author

qchenevier commented Jul 12, 2020

OK, to answer you question, @walmik, after a few research, I couldn't find any documentation showing a CI tool commiting back to the repo. It makes sense from a security standpoint: having an external worker able to write to the codebase, using a token, seems a bit extreme.

It seems that there is a widely shared philosophy of "the codebase is for humans only". The machines need to use other services, with read-only rights on the codebase.

IMHO the easiest workflow is:

If we chose to do this, I guess we have to:

  • remove the bundle in the dist folder from the codebase (= git rm then adding it to the .gitignore)
  • add a build task in .travis.yml (like described here), which would upload the bundle as a release (using a token having write permissions only on the releases).
  • update the cdnjs scribbletune.json file so that it taps into the releases url here and maybe here. I'm not sure how to do this, though.

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

No branches or pull requests

1 participant