Skip to content

Commit

Permalink
fix(build): build step fail due to symlinks created to run in localho…
Browse files Browse the repository at this point in the history
…st (#22)
  • Loading branch information
kosperera authored Mar 3, 2024
1 parent 8640d5c commit e9ef809
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#
# Project Specific Ignores
#
#
docs/docsify-footer.js
docs/docsify-footer.min.js

# Docsify Served Volume Mapping
docs/src
Expand Down
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ With VS Code:
- Run task: `Reopen in Container`
- Press `F5` to preview locally

To refer these two fake files pointing to the originals, you comment out the `<script>` pointing to the CDN in the [docs/index.html](./docs/index.html).

With Terminal:
- Run `bun build:clean` to build from source
- Create a couple of symlinks
```sh
cd docs && \
ln -s ../src/docsify-footer.js docsify-footer.js && \
ln -s ../dist/docsify-footer.min.js docsify-footer.min.js
```

To test the changes, you launch your favorite browser and visit [https://localhost:4321](https://localhost:4321).

### Pull Requests
Expand Down
1 change: 0 additions & 1 deletion docs/docsify-footer.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/docsify-footer.min.js

This file was deleted.

8 changes: 7 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>

<!-- using the footer plugin from source -->
<!--
using the footer plugin from source
bun build:clean && \
cd ./docs && \
ln -s ../src/docsify-footer.js docsify-footer.js && \
ln -s ../dist/docsify-footer.min.js docsify-footer.min.js
-->
<!-- <script src="./docsify-footer.min.js"></script> -->
<!-- <script src="./docsify-footer.js"></script> -->

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"scripts": {
"clean": "rm -rf node_modules/ dist/",
"build": "bun build --minify --no-bundle --outfile ./dist/docsify-footer.min.js ./src/docsify-footer.js",
"build:clean": "bun clean && bun run build",
"release": "bun install && bun --bun run np",
"lint": "deno lint",
"start": "docsify serve docs/ -p 4321"
Expand Down

0 comments on commit e9ef809

Please sign in to comment.