这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions docs/site/content/repo-docs/guides/ci-vendors/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
# To use Turborepo Remote Caching, set the following environment variables for the job.
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} // [!code highlight]
TURBO_TEAM: ${{ vars.TURBO_TEAM }} // [!code highlight]
env: # [!code highlight]
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} # [!code highlight]
TURBO_TEAM: ${{ vars.TURBO_TEAM }} # [!code highlight]

steps:
- name: Check out code
Expand Down Expand Up @@ -279,32 +279,32 @@ Configure your GitHub pipeline with a step which utilizes the `actions/cache@v4`
Example `ci` yaml with `.turbo` as chosen cache folder:

```yaml title=".github/workflows/ci.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cache turbo build setup // [!code highlight]
uses: actions/cache@v4 // [!code highlight]
with: // [!code highlight]
path: .turbo // [!code highlight]
key: ${{ runner.os }}-turbo-${{ github.sha }} // [!code highlight]
restore-keys: | // [!code highlight]
${{ runner.os }}-turbo- // [!code highlight]

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Cache turbo build setup # [!code highlight]
uses: actions/cache@v4 # [!code highlight]
with: # [!code highlight]
path: .turbo # [!code highlight]
key: ${{ runner.os }}-turbo-${{ github.sha }} # [!code highlight]
restore-keys: | # [!code highlight]
${{ runner.os }}-turbo-

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
```

</Step>
Expand Down
Loading