-
Notifications
You must be signed in to change notification settings - Fork 16
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-CD using Github Actions #9
Conversation
@nimworks it works! Please review the PR, and then merge it. In oreder to make it work i had to:
|
with: | ||
node-version: 14 | ||
- name: Install dependencies | ||
run: npm 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.
Ahh, we aren't using npm install
npm ci
uses package-lock.json instead of the package.json and is deemed to give faster reliable builds.
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js 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.
Should we name this to 'Build', coz I think this is what will appear on the default badge that Github Actions provide
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.
Nice work 👏
Just some minor non-breaking tweaks and we can merge!
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
publish_branch: master # default: gh-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.
Sorry, didn't notice u had already tried this in one of your earlier commits!
Since GITHUB_TOKEN is made available by default by a app installed on the repo when we enable Github Actions, maybe just doing run: npm run deploy
should work as well.
But, if it is already working this way, why to mingle with it, right 😁
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.
no the token does not work. We can remove the gh-pages npm package since when running is not recognized as an action. If you try to git push with gh-pages using the action token, it does not work. git asks you to auth.
Done with CI-CD setup using GitHub Actions to build and deploy to gh-pages branch of fabricjs.github.io repo on push or pull-request on master branch
Closes #4
Closes #6