Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
samhamilton committed Jun 19, 2021
1 parent 9c7ccf5 commit 3f41f1a
Show file tree
Hide file tree
Showing 4 changed files with 1,991 additions and 25 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/hexo.yml
Expand Up @@ -10,23 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: echo "::set-output name=dir::$(yarn cache dir)"
id: yarn-cache-dir-path
- uses: actions/setup-node@v2
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/assets/yarn.lock')) }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
- uses: actions/cache@v2
with:
path: assets/node_modules
key: ${{ runner.os }}-node-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/assets/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-node-v1-
- run: yarn install
${{ runner.os }}-node-
- run: npm ci
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
- run: echo "$GITHUB_WORKSPACE/assets/node_modules/.bin" >> $GITHUB_PATH
- run: yarn hexo deploy
- run: npm run deploy
2 changes: 1 addition & 1 deletion .tool-versions
@@ -1 +1 @@
nodejs 14.15.1
nodejs 14.17.1

0 comments on commit 3f41f1a

Please sign in to comment.