Skip to content

Commit

Permalink
chore: project workflow / structure
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed May 11, 2024
1 parent 529fb20 commit 2e2aaf0
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: "Build: Docs"

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

permissions:
contents: read

env:
INSTANCE: 'Writerside/e'
ARTIFACT: 'webHelpE2-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: |
out/${{ env.ARTIFACT }}
retention-days: 7

test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: docs
path: out

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build, test]
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
steps:
- name: Download artifacts
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/configure-pages@v4

- name: Package and upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/out
.DS_Store
/node_modules
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Elide Documentation

This project is compatible with [JetBrains Writerside](https://www.jetbrains.com/writerside/), an IDE for technical writing and documentation. The outputs of this project combine with [Dokka](https://github.com/Kotlin/dokka) and [Knit](https://github.com/Kotlin/kotlinx-knit) content to create Elide's [documentation site](https://docs.elide.dev).

3 changes: 2 additions & 1 deletion Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<ihp version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/writerside-cfg.xsd">
<topics dir="topics"/>
<images dir="images" web-path="images"/>
<images dir="images" web-path="docs"/>
<categories src="c.list"/>
<vars src="v.list"/>
<instance src="e.tree"/>
</ihp>

0 comments on commit 2e2aaf0

Please sign in to comment.