diff --git a/.github/workflows/dotnet.yml b/.github/workflows/build.yml similarity index 71% rename from .github/workflows/dotnet.yml rename to .github/workflows/build.yml index e67551c..b64dd62 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: .NET +name: Build on: push @@ -18,6 +18,15 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: BuildUI run: | npm install --prefix web diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 03ac73d..3b0978e 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -22,6 +22,16 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + - name: BuildUI run: | npm install --prefix web diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 932b740..0d197e0 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -21,6 +21,15 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: BuildUI run: | npm install --prefix web