Skip to content

Update to modern tech and vite #51

Update to modern tech and vite

Update to modern tech and vite #51

Workflow file for this run

# Build and deploy the site
name: Publish app
on:
workflow_dispatch:
push:
branches: [main]
defaults:
run:
shell: bash
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
test:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install dependencies
run: npm ci
- name: "Tests"
run: npm run test
build_and_deploy:
needs: test
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install dependencies
run: npm ci
- run: mkdir -p public
- name: Generate bundled files
run: npm run build
- name: Move static assets
run: npm run static
- name: Generate the index file
run: |
npm run svg
node ./src/functions/ssr.js
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "public"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1