Skip to content

Commit c7b7d01

Browse files
authored
Create 🌐 Build documentation.yml
1 parent 6f70b17 commit c7b7d01

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 🌐 Build documentation
2+
3+
on:
4+
push:
5+
# To trigger the workflow once you push to the `main` branch
6+
# Replace `main` with your branch’s name
7+
branches: ["master"]
8+
# Specify to run a workflow manually from the Actions tab on GitHub
9+
workflow_dispatch:
10+
11+
permissions:
12+
id-token: write
13+
pages: write
14+
15+
env:
16+
# Name of module and id separated by a slash
17+
INSTANCE: Writerside/e
18+
# Replace XX with the ID of the instance in capital letters
19+
ARTIFACT: webHelpE2-all.zip
20+
# Docker image version
21+
DOCKER_VERSION: 2.1.1479-p3869
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
- name: Build Writerside docs using Docker
32+
uses: JetBrains/writerside-github-action@v4
33+
with:
34+
instance: ${{ env.INSTANCE }}
35+
artifact: ${{ env.ARTIFACT }}
36+
docker-version: ${{ env.DOCKER_VERSION }}
37+
38+
- name: Save artifact with build results
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: docs
42+
path: |
43+
artifacts/${{ env.ARTIFACT }}
44+
retention-days: 7
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
# Requires build job results
51+
needs: build
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Download artifact
56+
uses: actions/download-artifact@v3
57+
with:
58+
name: docs
59+
60+
- name: Unzip artifact
61+
uses: montudor/action-zip@v1
62+
with:
63+
args: unzip -qq ${{ env.ARTIFACT }} -d dir
64+
65+
- name: Setup Pages
66+
uses: actions/configure-pages@v2
67+
68+
- name: Upload artifact
69+
uses: actions/upload-pages-artifact@v1
70+
with:
71+
path: dir
72+
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)