Skip to content

Commit

Permalink
pipeline update (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhaufe authored Dec 4, 2023
1 parent 249d009 commit 2e6d808
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 67 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,22 @@ jobs:
name: Build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
id: cache-npm
node-version: 20.x
cache: "npm"
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Restore Cache
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: steps.cache-npm.outputs.cache-hit != 'true'
name: List the state of node modules
run: npm list
continue-on-error: true
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Build
Expand All @@ -58,7 +47,6 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: dist
path: dist

deploy:
Expand All @@ -68,12 +56,6 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: dist
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v2
60 changes: 21 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,25 @@ on:
jobs:
validate:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache Node.js modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: steps.cache-npm.outputs.cache-hit != 'true'
name: List the state of node modules
run: npm list
continue-on-error: true

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Test
run: npm run test
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Restore Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm run test

0 comments on commit 2e6d808

Please sign in to comment.