Skip to content

Commit 3928004

Browse files
committed
remove the jsdoc to markdown
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent 39ae30f commit 3928004

File tree

3 files changed

+25
-73
lines changed

3 files changed

+25
-73
lines changed

Diff for: .github/workflows/flow-hugo-publish.yaml

+25-44
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
name: Deploy Hugo site to Pages
1919

2020
on:
21+
# Allows you to run this workflow manually from the Actions tab
22+
workflow_dispatch:
2123
# Runs on pushes targeting the default branch
2224
push:
2325
branches:
@@ -28,9 +30,12 @@ on:
2830
- '**/package*.json'
2931
- 'DEV.md'
3032
- 'README.md'
31-
32-
# Allows you to run this workflow manually from the Actions tab
33-
workflow_dispatch:
33+
# run in the pull request, but don't publish
34+
pull_request:
35+
types:
36+
- opened
37+
- reopened
38+
- synchronize
3439

3540
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
3641
permissions:
@@ -81,53 +86,28 @@ jobs:
8186
with:
8287
enablement: true
8388

84-
- name: Install jsdoc
85-
run: |
86-
cd docs
87-
npm i -g jsdoc
88-
jsdoc --version
89-
jsdoc -c jsdoc.conf.json
90-
cd -
91-
92-
- name: Install jsdoc-to-markdown
93-
run: |
94-
cd docs
95-
npm i -g jsdoc-to-markdown
96-
jsdoc2md --version
97-
./generate_md.sh
98-
cd -
99-
100-
- name: Copy existing documentation
101-
run: |
102-
mkdir -p docs/content/Developer
103-
cp DEV.md docs/content/Developer/DEV.md
104-
mkdir -p docs/content/User
105-
cp README.md docs/content/User/README.md
89+
- name: Install Task
90+
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
91+
with:
92+
version: 3.39.2
93+
repo-token: ${{ secrets.GITHUB_TOKEN }}
10694

10795
- name: Build with Hugo
108-
env:
109-
# For maximum backward compatibility with Hugo modules
110-
HUGO_ENVIRONMENT: production
111-
HUGO_ENV: production
11296
run: |
11397
cd docs
114-
echo "base_url ${{ steps.pages.outputs.base_url }}"
115-
echo "origin ${{ steps.pages.outputs.origin }}"
116-
echo "host ${{ steps.pages.outputs.host }}"
117-
echo "base_path ${{ steps.pages.outputs.base_path }}"
118-
mkdir -p themes/hugo-geekdoc
119-
curl -L https://github.com/thegeeklab/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C themes/hugo-geekdoc/ --strip-components=1
120-
ls -ltr
121-
hugo version
122-
hugo config
123-
hugo \
124-
--gc \
125-
--config hugo.toml \
126-
--minify \
127-
--baseURL "${{ steps.pages.outputs.base_url }}/"
98+
task default
12899
129-
- name: Upload artifact
100+
# Upload the built site to GitHub Pages
101+
- name: Upload Pages Artifact
130102
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
103+
if: ${{ contains(github.ref, 'main') }}
104+
with:
105+
path: ./docs/public
106+
107+
# Upload the built site to artifacts for troubleshooting or verification
108+
- name: Upload Artifact
109+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
110+
if: ${{ !contains(github.ref, 'main') }}
131111
with:
132112
path: ./docs/public
133113

@@ -141,4 +121,5 @@ jobs:
141121
steps:
142122
- name: Deploy to GitHub Pages
143123
id: deployment
124+
if: ${{ contains(github.ref, 'main') }}
144125
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

Diff for: docs/Taskfile.yaml

-12
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ tasks:
6868
cmds:
6969
- jsdoc -c jsdoc.conf.json
7070

71-
build:jsdoc-to-markdown:
72-
cmds:
73-
- ./generate_md.sh
74-
7571
build:copy:
7672
cmds:
7773
- mkdir -p content/Developer
@@ -83,7 +79,6 @@ tasks:
8379
cmds:
8480
- task: "install:hugo"
8581
- task: "install:jsdoc"
86-
- task: "install:jsdoc-to-markdown"
8782

8883
install:hugo:
8984
status:
@@ -97,10 +92,3 @@ tasks:
9792
cmds:
9893
- npm i -g jsdoc
9994
- jsdoc --version
100-
101-
install:jsdoc-to-markdown:
102-
status:
103-
- command -v jsdoc2md
104-
cmds:
105-
- npm i -g jsdoc-to-markdown
106-
- jsdoc2md --version

Diff for: docs/generate_md.sh

-17
This file was deleted.

0 commit comments

Comments
 (0)