Skip to content

Commit

Permalink
👷 Remove algolia parts
Browse files Browse the repository at this point in the history
  • Loading branch information
BalconyJH committed Jan 13, 2025
1 parent 2e6dd1b commit a35a0f8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 46 deletions.
72 changes: 36 additions & 36 deletions .github/actions/build-api-doc/action.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: Build documentation
description: Build documentation

on:
push:
branches: ["main"]
workflow_dispatch:

env:
INSTANCE: 'Writerside/hi'
ARTIFACT: 'webHelpHI2-all.zip'
DOCKER_VERSION: '243.21565'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build docs using Writerside Docker builder
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Save artifact with build results
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
retention-days: 7
#name: Build documentation
#description: Build documentation
#
#on:
# push:
# branches: ["main"]
# workflow_dispatch:
#
#env:
# INSTANCE: 'docs/hi'
# ARTIFACT: 'webHelpHI2-all.zip'
# DOCKER_VERSION: '243.21565'
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Build docs using docs Docker builder
# uses: JetBrains/writerside-github-action@v4
# with:
# instance: ${{ env.INSTANCE }}
# artifact: ${{ env.ARTIFACT }}
# docker-version: ${{ env.DOCKER_VERSION }}
#
# - name: Save artifact with build results
# uses: actions/upload-artifact@v4
# with:
# name: docs
# path: |
# artifacts/${{ env.ARTIFACT }}
# retention-days: 7
18 changes: 8 additions & 10 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build documentation

on:
push:
branches: ["main"]
branches: [ "main" ]
paths:
- "docs/**"
- "Dockerfile"
Expand All @@ -15,7 +15,7 @@ permissions:
pages: write

env:
INSTANCE: 'docs/testdoc'
INSTANCE: 'docs/a'
DOCKER_VERSION: '243.22562'

jobs:
Expand All @@ -30,40 +30,38 @@ jobs:
with:
fetch-depth: 0

- name: Define instance id and artifacts
- name: Define instance id and artifact
id: define-ids
run: |
INSTANCE=${INSTANCE#*/}
INSTANCE_ID_UPPER=$(echo "$INSTANCE" | tr '[:lower:]' '[:upper:]')
ARTIFACT="webHelp${INSTANCE_ID_UPPER}2-all.zip"
ALGOLIA_ARTIFACT="algolia-indexes-${INSTANCE_ID_UPPER}.zip"
# Print the values
echo "INSTANCE_ID_UPPER: $INSTANCE_ID_UPPER"
echo "ARTIFACT: $ARTIFACT"
echo "ALGOLIA_ARTIFACT: $ALGOLIA_ARTIFACT"
# Set the environment variables and outputs
echo "INSTANCE_ID_UPPER=$INSTANCE_ID_UPPER" >> $GITHUB_ENV
echo "ARTIFACT=$ARTIFACT" >> $GITHUB_ENV
echo "ALGOLIA_ARTIFACT=$ALGOLIA_ARTIFACT" >> $GITHUB_ENV
echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT
echo "algolia_artifact=$ALGOLIA_ARTIFACT" >> $GITHUB_OUTPUT
- name: Build docs using Writerside Docker builder
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Create artifacts directory
run: mkdir -p artifacts

- name: Save artifact with build results
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ steps.define-ids.outputs.artifact }}
artifacts/report.json
artifacts/${{ steps.define-ids.outputs.algolia_artifact }}
retention-days: 7
deploy:
environment:
Expand Down

0 comments on commit a35a0f8

Please sign in to comment.