From c4ecce5f4478fadadca648f8f9c874600866b720 Mon Sep 17 00:00:00 2001 From: Attaphong Rattanaveerachanon Date: Fri, 28 Jan 2022 14:16:46 +0700 Subject: [PATCH] Update document for github-actions workflow by adding cache step. - update the example of yml code - update code description --- docs/_docs/continuous-integration/github-actions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_docs/continuous-integration/github-actions.md b/docs/_docs/continuous-integration/github-actions.md index ade090eeda7..e5513bdf66b 100644 --- a/docs/_docs/continuous-integration/github-actions.md +++ b/docs/_docs/continuous-integration/github-actions.md @@ -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 }} @@ -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`