Skip to content

Commit

Permalink
setup writerside github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ikarenkov committed Jun 2, 2024
1 parent f9a51d3 commit 8cad987
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 1 deletion.
71 changes: 71 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build documentation

on:
push:
branches: ["dev"]
pull_request:
branches:
- "dev"
workflow_dispatch:

permissions:
id-token: write
pages: write

env:
INSTANCE: 'Writerside/modo-docs'
ARTIFACT: 'webHelpMODO-DOCS2-all.zip'
DOCKER_VERSION: '241.15989'

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

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Requires build job results
needs: build
runs-on: ubuntu-latest

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: docs

- name: Unzip artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir

- name: Setup Pages
uses: actions/[email protected]

- name: Upload artifact
uses: actions/[email protected]
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
1 change: 0 additions & 1 deletion Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<variables></variables>
<build-profile instance="modo-docs">
<variables>
<noindex-content>false</noindex-content>
Expand Down

0 comments on commit 8cad987

Please sign in to comment.