Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build docs

on:
workflow_dispatch:

permissions:
id-token: write
pages: write

env:
PRODUCT: Writerside/d
ARTIFACT: webHelpD2-all.zip
ALGOLIA_ARTIFACT: algolia-indexes-D.zip

jobs:
build-job:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build Writerside docs using Docker
uses: JetBrains/writerside-github-action@v3
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: artifact
path: artifacts/${{ env.ARTIFACT }}
retention-days: 7
- name: Upload algolia-indexes
uses: actions/upload-artifact@v3
with:
name: algolia-indexes
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
retention-days: 7

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build-job
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact
- name: Unzip artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq ${{ env.ARTIFACT }} -d dir
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: dir
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1