Skip to content

Commit

Permalink
Ci/fix publish (#484)
Browse files Browse the repository at this point in the history
* ci: 👷 Updated dist to work with pnpm

* ci: 👷 Added test step to node.js action
  • Loading branch information
JeffJacobson authored Oct 28, 2024
1 parent 4eec1c7 commit 809af5e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

# Install project dependencies
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile --reporter append-only --prefer-offline

- name: Test
run: pnpm test

23 changes: 19 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,40 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: windows-latest
steps:
# Checkout your repository
- name: Checkout
uses: actions/checkout@v4

# Install pnpm
- name: Install pnpm
uses: pnpm/action-setup@v4

# Setup Node. Install latest version ("*")
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "*"
cache: "npm"
cache: "pnpm"

# Install project dependencies
- name: Install dependencies
run: npm ci
# Build with Vite build, explicitly setting the base URL.
run: pnpm install

# Build the app
- name: Build
run: npx vite build --base '/wsdot-mp-map'
run: pnpm exec vite build --base '/wsdot-mp-map'

# Setup Github Pages
- name: Setup Pages
uses: actions/configure-pages@v4

# Upload the built app code to an artifact
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: "./dist"
# Deploy the artifact to Github Pages.
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 809af5e

Please sign in to comment.