# Controls when the action will run. Triggers the workflow on push or pull request # events but only for the hexo branch (change to your hexo blog branch) on: push: branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" hexo-deployment: # The type of runner that the job will run on runs-on:ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it -name:Checkoutsource uses:actions/checkout@v1 with: submodules:true
# Controls when the action will run. Triggers the workflow on push or pull request # events but only for the hexo branch (change to your hexo blog branch) on: push: branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" hexo-deployment: # The type of runner that the job will run on runs-on:ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it -name:Checkoutsource uses:actions/checkout@v1 with: submodules:true
-uses:actions/cache@v1 id:yarn-cache# use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path:${{steps.yarn-cache-dir-path.outputs.dir}} key:${{runner.os}}-yarn-${{hashFiles('**/yarn.lock')}} restore-keys:| ${{runner.os}}-yarn-
腾讯云 coscmd 是使用 pip 安装的,如果是使用的 COS 的话还可以缓存 pip 模块提高速度。添加的位置跟上面一样。