Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit da76681

Browse files
committed
Attempt and GitHub actions automatic build
1 parent 38d6728 commit da76681

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/build-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
env:
9+
INSTANCE: 'Writerside/ch'
10+
DOCKER_VERSION: '243.21565'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
algolia_artifact: ${{ steps.define-ids.outputs.algolia_artifact }}
17+
artifact: ${{ steps.define-ids.outputs.artifact }}
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Define instance id and artifacts
25+
id: define-ids
26+
run: |
27+
INSTANCE=${INSTANCE#*/}
28+
INSTANCE_ID_UPPER=$(echo "$INSTANCE" | tr '[:lower:]' '[:upper:]')
29+
ARTIFACT="webHelp${INSTANCE_ID_UPPER}2-all.zip"
30+
ALGOLIA_ARTIFACT="algolia-indexes-${INSTANCE_ID_UPPER}.zip"
31+
32+
# Print the values
33+
echo "INSTANCE_ID_UPPER: $INSTANCE_ID_UPPER"
34+
echo "ARTIFACT: $ARTIFACT"
35+
echo "ALGOLIA_ARTIFACT: $ALGOLIA_ARTIFACT"
36+
37+
# Set the environment variables and outputs
38+
echo "INSTANCE_ID_UPPER=$INSTANCE_ID_UPPER" >> $GITHUB_ENV
39+
echo "ARTIFACT=$ARTIFACT" >> $GITHUB_ENV
40+
echo "ALGOLIA_ARTIFACT=$ALGOLIA_ARTIFACT" >> $GITHUB_ENV
41+
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
42+
echo "algolia_artifact=$ALGOLIA_ARTIFACT" >> $GITHUB_OUTPUT
43+
44+
- name: Build docs using Writerside Docker builder
45+
uses: JetBrains/writerside-github-action@v4
46+
with:
47+
instance: ${{ env.INSTANCE }}
48+
artifact: ${{ env.ARTIFACT }}
49+
docker-version: ${{ env.DOCKER_VERSION }}
50+
51+
- name: Save artifact with build results
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: docs
55+
path: |
56+
artifacts/${{ env.ARTIFACT }}
57+
artifacts/report.json
58+
artifacts/${{ env.ALGOLIA_ARTIFACT }}
59+
retention-days: 7

0 commit comments

Comments
 (0)