From 0e31363f7d8bdfc049e13cce0a4a00c77e1bf51f Mon Sep 17 00:00:00 2001 From: tony green Date: Fri, 10 Nov 2023 17:46:26 +0800 Subject: [PATCH] format --- .github/workflows/main.yml | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3efa658..eba0dfc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,13 +3,11 @@ on: push: branches: - master - - env: -SERVER_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }} # 服务器私钥 - SERVER_HOST: ${{ secrets.HOST }} # 服务器IP地址 - USER_NAME: ${{ secrets.NAME }} # 服务器用户名 - cache-name: blog - +env: + SERVER_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }} # 服务器私钥 + SERVER_HOST: ${{ secrets.HOST }} # 服务器IP地址 + USER_NAME: ${{ secrets.NAME }} # 服务器用户名 + cache-name: blog jobs: build: runs-on: ubuntu-latest @@ -24,21 +22,21 @@ jobs: uses: actions/setup-node@v1 with: node-version: 14 - #缓存依赖 - - name: Cache nodemodules - uses: actions/cache@v1 - env: - cache-name: cache-node-modules - with: - # 需要缓存的文件的路径 - path: ./node_modules - # 对缓存的文件指定的唯一标识 - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }} - # 用于没有再找目标key的缓存的backup选项 - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- + #缓存依赖 + - name: Cache nodemodules + uses: actions/cache@v1 + env: + cache-name: cache-node-modules + with: + # 需要缓存的文件的路径 + path: ./node_modules + # 对缓存的文件指定的唯一标识 + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package.json') }} + # 用于没有再找目标key的缓存的backup选项 + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- # npm install - name: npm install and build run: |