Skip to content

Commit

Permalink
Merge pull request #20 from KCarlile/14-setup-cd-to-demo-site
Browse files Browse the repository at this point in the history
Changing examples page to reference symbolic links to JS files
  • Loading branch information
KCarlile authored May 28, 2024
2 parents e767301 + 08cf834 commit baad121
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 4 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/demo-hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/**
4 changes: 2 additions & 2 deletions docs/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Examples | Guitar Diagrams JS</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="css/styles.css" rel="stylesheet">
<link href="./css/styles.css" rel="stylesheet">
</head>
<body>
<div class="container my-5">
Expand Down Expand Up @@ -213,7 +213,7 @@ <h5>Code</h5>
</div>
</div>
<!-- BEGIN: custom script include for Guitar Diagrams JS -->
<script src="js/main.js" type="module"></script>
<script src="./js/main.js" type="module"></script>
<!-- END: custom script include for Guitar Diagrams JS -->
<!-- BEGIN: CDN include for Bootstrap -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
Expand Down
3 changes: 3 additions & 0 deletions docs/examples/js/guitar-diagrams-js/README.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions docs/examples/js/guitar-diagrams-js/guitar-diagrams.js
2 changes: 1 addition & 1 deletion docs/examples/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit baad121

Please sign in to comment.