Skip to content

Commit 7081f95

Browse files
authored
Merge pull request #275 from Kotlin/koperagen-patch-1
Setup documentation CI/CD
2 parents dcd77dc + 902b293 commit 7081f95

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/main.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build docs
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
id-token: write
8+
pages: write
9+
10+
env:
11+
PRODUCT: Writerside/d
12+
ARTIFACT: webHelpD2-all.zip
13+
ALGOLIA_ARTIFACT: algolia-indexes-D.zip
14+
15+
jobs:
16+
build-job:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
- name: Build Writerside docs using Docker
22+
uses: JetBrains/writerside-github-action@v3
23+
- name: Upload artifact
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: artifact
27+
path: artifacts/${{ env.ARTIFACT }}
28+
retention-days: 7
29+
- name: Upload algolia-indexes
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: algolia-indexes
33+
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
34+
retention-days: 7
35+
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
needs: build-job
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Download artifact
44+
uses: actions/download-artifact@v3
45+
with:
46+
name: artifact
47+
- name: Unzip artifact
48+
uses: montudor/action-zip@v1
49+
with:
50+
args: unzip -qq ${{ env.ARTIFACT }} -d dir
51+
- name: Setup Pages
52+
uses: actions/configure-pages@v2
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v1
55+
with:
56+
path: dir
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)