8000 Recommend using `actions/cache` in GitHub Actions documentation by detohm · Pull Request #8948 · jekyll/jekyll · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Recommend using actions/cache in GitHub Actions documentation #8948

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
Jan 28, 2022
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
7 changes: 7 additions & 0 deletions docs/_docs/continuous-integration/github-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: helaili/jekyll-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -126,6 +132,7 @@ The above workflow can be explained as the following:
the Action from overwriting the `gh-pages` branch on any feature branch pushes.
- The **name** of the job matches our YAML filename: `github-pages`.
- The **checkout** action takes care of cloning your repository.
- The **cache** action is an optimisation for shorten the build times.
- We specify our selected **action** and **version number** using `helaili/jekyll-action@2.0.5`.
This handles the build and deploy.
- We set a reference to a secret **environment variable** for the action to use. The `GITHUB_TOKEN`
Expand Down
0