Skip to content

fix

fix #97

Workflow file for this run

name: Node.js CI
on:
push:
branches: ["**"]
tags: ["**"]
release:
types: ["created"]
pull_request:
branches: ["**"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install
run: npm install
- name: Build
run: npm run build:vite --if-present
env:
CI: true
- name: Pack
run: |
mkdir -v -p build/web
cp -r dist/** build/web/
touch build/web/.nojekyll
- name: Upload Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v1
with:
name: web
path: build/web
- name: Install rsync 📚
if: github.ref == 'refs/heads/main'
uses: GuillaumeFalourd/[email protected]
- name: Deploy to GitHub Pages 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: build/web