diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8e2bbe8 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Prepare deployment directory + run: | + cp src/callsign.js docs/ + cp src/callsign.css docs/ + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'docs' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index af54ec3..5ffc223 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ node_modules/ package-lock.json test-page.html test.html +docs/callsign.js +docs/callsign.css diff --git a/README.md b/README.md index 28d3450..7bbebf8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # callsign.js This JavaScript library gives website users more ways to interact with written [ITU](https://www.itu.int/en/) call signs, including for amateur radio. +## Demo +See a live example at [https://phieri.github.io/callsign.js/](https://phieri.github.io/callsign.js/) + # Usage Upload callsign.js and callsign.css to the webserver and add callsign.js to the `` section. ```html diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..5c162d5 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,34 @@ + + + + + + callsign.js example page + + + + + + + + +
+

callsign.js example page

+
+
+ +
+ + + +