Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit d84cf80

Browse files
committed
Add build.yml
1 parent 6a33f10 commit d84cf80

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/ build.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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/xx
18+
# Replace XX with the ID of the instance in capital letters
19+
ARTIFACT: webHelpLITECOMMANDS2-all.zip
20+
# Docker image version
21+
DOCKER_VERSION: 232.10275
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: Upload artifact
39+
uses: actions/upload-artifact@v3
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+
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
62+
63+
- name: Setup Pages
64+
uses: actions/configure-pages@v2
65+
66+
- name: Upload artifact
67+
uses: actions/upload-pages-artifact@v1
68+
with:
69+
path: dir
70+
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)