Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuiantw1212 committed Feb 1, 2024
1 parent 6d17a82 commit 2486160
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ on:
branches: [ "econ-sense-vite-press" ]

jobs:
# Build job
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
Expand All @@ -26,6 +27,25 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm install
- run: npm run build --if-present
- run: npm test

- name: Upload artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
path: ./vitepress/dist
if-no-files-found: error

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 2486160

Please sign in to comment.