Skip to content

Commit 97c79ca

Browse files
authored
Merge pull request #428 from junior/docs_update
Docs update
2 parents 830a127 + 5984d76 commit 97c79ca

File tree

3 files changed

+47
-21
lines changed

3 files changed

+47
-21
lines changed

.github/workflows/docs.yml

+31-14
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,50 @@ name: Publish Docs
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- master
77
- docs_update
88
paths:
99
- 'src/docs/**'
10+
workflow_dispatch:
1011
jobs:
11-
build-and-deploy:
12+
build:
1213
runs-on: ubuntu-latest
14+
env:
15+
HUGO_VERSION: 0.122.0
1316
steps:
1417
- name: Checkout
15-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1619
- name: Setup Node
17-
uses: actions/setup-node@v2
20+
uses: actions/setup-node@v4
1821
with:
19-
node-version: '14'
22+
node-version: ''
2023
- name: Setup Hugo
21-
uses: peaceiris/actions-hugo@v2
22-
with:
23-
hugo-version: '0.82.0'
24-
extended: true
24+
run: |
25+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
26+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
27+
- name: Setup Pages
28+
id: pages
29+
uses: actions/configure-pages@v5
2530
- name: Build Hugo Docs
2631
run: |
2732
cd src/docs
2833
make build
29-
- name: Publish to Github Pages
30-
uses: peaceiris/actions-gh-pages@v3
34+
- name: Upload production artifact
35+
uses: actions/upload-pages-artifact@v3
3136
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_branch: gh-pages
34-
publish_dir: src/docs/public
37+
path: ./src/docs/public
38+
39+
deploy:
40+
needs: build
41+
permissions:
42+
pages: write
43+
id-token: write
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/test-docs.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@ on:
77
jobs:
88
test-build:
99
runs-on: ubuntu-latest
10+
env:
11+
HUGO_VERSION: 0.122.0
1012
steps:
1113
- name: Checkout
12-
uses: actions/checkout@v1
14+
uses: actions/checkout@v4
1315
- name: Setup Node
14-
uses: actions/setup-node@v1
16+
uses: actions/setup-node@v4
1517
with:
16-
node-version: '10.x'
18+
node-version: ''
1719
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@v2
19-
with:
20-
hugo-version: '0.66.0'
21-
extended: true
20+
run: |
21+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
22+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
2223
- name: Build Hugo Docs
2324
run: |
2425
cd src/docs

src/docs/content/usage.md

+8
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ Content with aspect ratio of `2-1`
185185
> Display content as cards - usually in a grid
186186

187187
{{% grid col="1-2" y="top" %}}
188+
188189
```markdown
189190
{{%/* grid col="1-2" */%}}
190191
{{%/* card style="primary" title="Primary" hover=true */%}}
@@ -225,6 +226,7 @@ Card body
225226
> Add a grid of inner contents using [grid](https://getuikit.com/docs/grid) and [flex](https://getuikit.com/docs/flex)
226227

227228
{{% grid col="1-2" y="top" %}}
229+
228230
```markdown
229231
{{%/* grid col="1-3" */%}}
230232
- **Example**
@@ -235,6 +237,7 @@ Card body
235237

236238
{{% wrapper %}}
237239
{{% grid col="1-3" %}}
240+
238241
- **Example**
239242
- Item one
240243
- Item two
@@ -342,6 +345,7 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/
342345
> Create a tabbed content switcher
343346

344347
{{% grid col="1-2" y="top" %}}
348+
345349
```markdown
346350
{{</* switcher left=true tabs="One|Two|Three" */>}}
347351
- Tab one content
@@ -355,10 +359,13 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/
355359

356360
{{% wrapper %}}
357361
{{< switcher left=true tabs="One|Two|Three" >}}
362+
358363
- Tab one content
364+
359365
```ts
360366
const foo: string = 'bar';
361367
```
368+
362369
- Tab two content
363370
- Tab three content
364371
{{< /switcher >}}
@@ -409,6 +416,7 @@ Slideshow items must be `<li>` type. Refer to [usage](https://getuikit.com/docs/
409416
> Wraps inner content with any `div` and specified classes. Useful for specifying markup with other UIkit features
410417

411418
{{% grid col="1-2" y="top" %}}
419+
412420
```markdown
413421
{{%/* wrapper "uk-light uk-background-primary uk-panel uk-padding" */%}}
414422
Light Panel

0 commit comments

Comments
 (0)