Skip to content

Commit 02c58d4

Browse files
committed
fix[docs.yml]: fix pipeline
1 parent 057b277 commit 02c58d4

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

.github/workflows/docs.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
deploy:
11+
build:
1212
runs-on: ubuntu-latest
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
@@ -20,14 +20,38 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v4
23-
24-
25-
# Includes the AsciiDoctor GitHub Pages Action to convert adoc files to html and publish to gh-pages branch
26-
- name: asciidoctor-ghpages
23+
24+
- uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: 2.7
27+
28+
- uses: reitzig/actions-asciidoctor@v2.0.2
29+
with:
30+
version: 2.0.18
31+
32+
- name: run asciidoctor
33+
run: asciidoctor -R docs -D build/site/html -a docinfo=shared -a toc=left -a toclevels=2 'docs/index.adoc'
34+
35+
- name: Add CNAME file
36+
if: github.ref != 'refs/heads/main'
37+
run: echo 'preview.rfd-fhem.github.io' > build/site/html/CNAME"
38+
39+
- name: Add CNAME file
2740
if: github.ref == 'refs/heads/main'
28-
uses: manoelcampos/asciidoctor-ghpages-action@v2
41+
run: echo 'pysignalduino.rfd-fhem.github.io' > build/site/html/CNAME"
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v4
2945
with:
30-
pdf_build: false
31-
source_dir: docs/
32-
asciidoctor_attributes: "docinfo=shared toc=left toclevels=2"
33-
46+
path: build/site/html
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)