Compare commits
4 Commits
453aeb24a3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2df97bbcac | |||
| 4440c1fc2b | |||
| 9700f75d7c | |||
| d95ea2705b |
41
.github/workflows/deploy.yml
vendored
Normal file
41
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Deploy Vite app to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: './dist'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -32,7 +32,7 @@ const SVG_CONFIG = {
|
||||
|
||||
/**
|
||||
* Parse input text and identify tab lines vs annotation lines
|
||||
* Adds + signs to positive numbers in tab lines
|
||||
* Adds + signs to positive numbers in tab lines (if not already present)
|
||||
* Preserves empty lines for spacing
|
||||
*/
|
||||
const parseInput = (text) => {
|
||||
@@ -42,13 +42,13 @@ const parseInput = (text) => {
|
||||
// Check if line is empty
|
||||
const isEmpty = line.trim().length === 0;
|
||||
|
||||
// Tab lines contain only numbers, spaces, minus signs, and bend markers
|
||||
// Tab lines contain only numbers, spaces, +/- signs, and bend markers
|
||||
const isTabLine =
|
||||
/^[\s\d\-'"`'']+$/.test(line.trim()) && line.trim().length > 0;
|
||||
/^[\s\d\+\-'"`'']+$/.test(line.trim()) && line.trim().length > 0;
|
||||
|
||||
let processedContent = line;
|
||||
|
||||
// Add + signs to positive numbers in tab lines
|
||||
// Add + signs to positive numbers in tab lines (only if not already present)
|
||||
if (isTabLine) {
|
||||
processedContent = line.replace(
|
||||
/(\s|^)(\d+)(['"`'']?)/g,
|
||||
|
||||
@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: '/harmonica-tabs-image-app/',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user