Skip to content

Commit c27dd4f

Browse files
committed
Add CI workflow for building and deploying documentation using Writerside
1 parent e61e635 commit c27dd4f

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and deploy docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs-workflow.yml'
9+
10+
env:
11+
WRITERSIDE_VERSION: "2025.04.8412"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Build docs
20+
run: >
21+
docker run --rm -v ${{ github.workspace }}:/opt/sources
22+
-e SOURCE_DIR=/opt/sources/docs/
23+
-e MODULE_INSTANCE=Writerside/main
24+
-e OUTPUT_DIR=/opt/sources/output
25+
-e RUNNER=other
26+
jetbrains/writerside-builder:${{ env.WRITERSIDE_VERSION }}
27+
28+
- name: Extract built docs
29+
run: |
30+
mkdir -p deploy
31+
unzip output/webHelpMAIN2-all.zip -d deploy
32+
33+
- name: Deploy to Cloudflare Pages
34+
uses: cloudflare/wrangler-action@v3
35+
with:
36+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
37+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38+
command: pages deploy deploy --project-name=nullopsdevs-libsshnet --branch=main

src/NullOpsDevs.LibSsh.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<Folder Name="/CI-CD/">
33
<File Path="../.github\workflows\test.yml" />
44
<File Path="../.github\workflows\publish.yml" />
5+
<File Path="..\.github\workflows\docs-workflow.yml" />
56
</Folder>
67
<Project Path="NullOpsDevs.Libssh.NuGetTest\NullOpsDevs.Libssh.NuGetTest.csproj" Type="Classic C#" />
78
<Project Path="NullOpsDevs.LibSsh.Test\NullOpsDevs.LibSsh.Test.csproj" Type="Classic C#" />

0 commit comments

Comments
 (0)