-
Notifications
You must be signed in to change notification settings - Fork 2k
docs: better gh-actions example #1197
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
Conversation
@Kikobeats is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' |
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.
This is specifically the npm
CI configuration, we shouldn't remove this.
@@ -71,15 +71,25 @@ Create file called `.github/workflows/ci.yml` in your repository with the follow | |||
|
|||
steps: | |||
- name: Check out code | |||
uses: actions/checkout@v2 | |||
uses: actions/checkout@v3 |
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.
This is unrelated but if we're going to make this switch let's get all of the locations.
with: | ||
fetch-depth: 2 | ||
path: | | ||
node_modules/.cache/turbo |
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.
This will grow unboundedly as turbo
does not presently prune caches and it will use the alternative restore-keys
to always end up with a hit.
fetch-depth: 2 | ||
path: | | ||
node_modules/.cache/turbo | ||
# if you use pnpm, uncomment the following lines |
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.
The pnpm
stuff should be dropped into the pnpm
configuration later in this file.
# ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ matrix.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.os }}- |
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.
runner.os
and matrix.os
are redundant here.
This reverts commit 5b1afb1.
Hello,
I updated the GitHub Actions example to maximize caching capabilities.