From 5413b0d99d7a75cee94ecadc6ad6e2f6bd6da876 Mon Sep 17 00:00:00 2001 From: Kenny Carlile Date: Tue, 28 May 2024 11:48:52 -0700 Subject: [PATCH 1/2] Changing examples page to reference symbolic links to JS files --- docs/examples/index.html | 4 ++-- docs/examples/js/guitar-diagrams-js/README.md | 3 +++ docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.js | 1 + docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.js | 1 + docs/examples/js/guitar-diagrams-js/guitar-diagrams.js | 1 + docs/examples/js/main.js | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 docs/examples/js/guitar-diagrams-js/README.md create mode 120000 docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.js create mode 120000 docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.js create mode 120000 docs/examples/js/guitar-diagrams-js/guitar-diagrams.js diff --git a/docs/examples/index.html b/docs/examples/index.html index 7305735..b744720 100644 --- a/docs/examples/index.html +++ b/docs/examples/index.html @@ -5,7 +5,7 @@ Examples | Guitar Diagrams JS - +
@@ -213,7 +213,7 @@
Code
- + diff --git a/docs/examples/js/guitar-diagrams-js/README.md b/docs/examples/js/guitar-diagrams-js/README.md new file mode 100644 index 0000000..db5081c --- /dev/null +++ b/docs/examples/js/guitar-diagrams-js/README.md @@ -0,0 +1,3 @@ +# README + +This directory contains symlinks to guitar-diagrams.js, guitar-diagrams-marker.js, and guitar-diagrams-config.js for the example and testing pages. These are overwritten by actual files with a GitHub action upon deployment to the demo server. diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.js b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.js new file mode 120000 index 0000000..f4ed4d0 --- /dev/null +++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-config.js @@ -0,0 +1 @@ +../../../../guitar-diagrams-config.js \ No newline at end of file diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.js b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.js new file mode 120000 index 0000000..d0251db --- /dev/null +++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams-marker.js @@ -0,0 +1 @@ +../../../../guitar-diagrams-marker.js \ No newline at end of file diff --git a/docs/examples/js/guitar-diagrams-js/guitar-diagrams.js b/docs/examples/js/guitar-diagrams-js/guitar-diagrams.js new file mode 120000 index 0000000..28972aa --- /dev/null +++ b/docs/examples/js/guitar-diagrams-js/guitar-diagrams.js @@ -0,0 +1 @@ +../../../../guitar-diagrams.js \ No newline at end of file diff --git a/docs/examples/js/main.js b/docs/examples/js/main.js index ca59017..45b1ea0 100644 --- a/docs/examples/js/main.js +++ b/docs/examples/js/main.js @@ -8,7 +8,7 @@ * @link https://github.com/KCarlile */ -import { GuitarDiagramsJS } from '../../../guitar-diagrams.js'; +import { GuitarDiagramsJS } from './guitar-diagrams-js/guitar-diagrams.js'; // ========== BEGIN example 1 let gdj1 = new GuitarDiagramsJS(); From 08cf834cf389b66deb4779cb24561aacdc21da38 Mon Sep 17 00:00:00 2001 From: Kenny Carlile Date: Tue, 28 May 2024 11:56:40 -0700 Subject: [PATCH 2/2] Fixing github action script to handle JS library --- .github/workflows/demo-hosting.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/demo-hosting.yml b/.github/workflows/demo-hosting.yml index 76c12dd..ae54570 100644 --- a/.github/workflows/demo-hosting.yml +++ b/.github/workflows/demo-hosting.yml @@ -12,7 +12,7 @@ jobs: - name: Get latest code uses: actions/checkout@v2 - - name: Sync files + - name: Upload docs/examples/* uses: SamKirkland/FTP-Deploy-Action@4.3.2 with: server: 107.180.58.30 @@ -21,5 +21,24 @@ jobs: local-dir: docs/examples/ server-dir: guitar-diagrams-js/ exclude: | + **/.git* + **/.git*/** + **/node_modules/** testing.html js/testing.js + + - name: Upload *.js files to overwrite symlinks + uses: SamKirkland/FTP-Deploy-Action@4.3.2 + with: + server: 107.180.58.30 + username: ${{ secrets.ftp_username }} + password: ${{ secrets.ftp_password }} + local-dir: ./ + server-dir: guitar-diagrams-js/js/guitar-diagrams-js/ + exclude: | + **/.git* + **/.git*/** + **/node_modules/** + README.md + LICENSE + **/docs/**