这是indexloc提供的服务,不要输入任何密码
Skip to content

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

Merged
merged 1 commit into from
May 6, 2022
Merged

Conversation

Kikobeats
Copy link
Member

Hello,

I updated the GitHub Actions example to maximize caching capabilities.

@vercel
Copy link

vercel bot commented May 6, 2022

@Kikobeats is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@kodiakhq kodiakhq bot merged commit 5b1afb1 into vercel:main May 6, 2022
@Kikobeats Kikobeats deleted the docs/gh-actions branch May 6, 2022 15:36

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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 }}-
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

3 participants