Skip to content

Commit aa14df3

Browse files
Added documentation
1 parent 49a7f96 commit aa14df3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2275
-333
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
* text=auto
22

3+
docs/ export-ignore
4+
35
.github/ export-ignore
46
tests/ export-ignore
57
workbench/ export-ignore

.github/images/idea.png

-15.8 KB
Binary file not shown.

.github/workflows/docs.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 1.x
8+
workflow_dispatch:
9+
10+
permissions:
11+
id-token: write
12+
pages: write
13+
14+
env:
15+
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
16+
ALGOLIA_APP_NAME: ${{ secrets.ALGOLIA_APPLICATION_ID }}
17+
ALGOLIA_ARTIFACT: algolia-indexes-LARAVEL-FEEDS.zip
18+
ALGOLIA_INDEX_NAME: laravel-feeds
19+
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
20+
ARTIFACT_DOCS: webHelpLARAVEL-FEEDS2-all.zip
21+
ARTIFACT_INDEXES: search-indexes
22+
CONFIG_JSON_PRODUCT: LARAVEL-FEEDS
23+
CONFIG_JSON_VERSION: main
24+
INSTANCE: docs/laravel-feeds
25+
DOMAIN_NAME: feeds.dragon-code.pro
26+
BUILDER_VERSION: 2025.04.8412
27+
28+
jobs:
29+
build:
30+
name: Build application
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Build documentation
39+
uses: JetBrains/writerside-github-action@v4
40+
with:
41+
instance: ${{ env.INSTANCE }}
42+
artifact: ${{ env.ARTIFACT_DOCS }}
43+
docker-version: ${{ env.BUILDER_VERSION }}
44+
45+
- name: Upload artifacts
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: docs
49+
path: |
50+
artifacts/${{ env.ARTIFACT_DOCS }}
51+
artifacts/report.json
52+
retention-days: 7
53+
54+
- name: Upload search indexes
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ${{ env.ARTIFACT_INDEXES }}
58+
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
59+
retention-days: 7
60+
61+
test:
62+
needs: build
63+
name: Testing
64+
runs-on: ubuntu-latest
65+
66+
steps:
67+
- name: Download docs artifact
68+
uses: actions/download-artifact@v5
69+
with:
70+
name: docs
71+
path: artifacts
72+
73+
- name: Test documentation
74+
uses: JetBrains/writerside-checker-action@v1
75+
with:
76+
instance: ${{ env.INSTANCE }}
77+
78+
robots:
79+
needs: build
80+
name: Generate robots.txt
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: Create robots.txt
85+
run: |
86+
touch robots.txt
87+
echo "User-Agent: *" >> robots.txt
88+
echo "Disallow: " >> robots.txt
89+
echo "Host: https://${{ env.DOMAIN_NAME }}" >> robots.txt
90+
echo "Sitemap: https://${{ env.DOMAIN_NAME }}/sitemap.xml" >> robots.txt
91+
92+
- name: Upload artifacts
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: robots
96+
path: robots.txt
97+
retention-days: 7
98+
99+
deploy-pages:
100+
environment:
101+
name: deploy
102+
url: ${{ steps.deployment.outputs.page_url }}
103+
104+
needs:
105+
- test
106+
- robots
107+
108+
name: Deploy to pages
109+
runs-on: ubuntu-latest
110+
111+
steps:
112+
- name: Download docs artifact
113+
uses: actions/download-artifact@v5
114+
with:
115+
name: docs
116+
117+
- name: Download robots artifact
118+
uses: actions/download-artifact@v5
119+
with:
120+
name: robots
121+
122+
- name: Unzip artifact
123+
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT_DOCS }}' -d dir
124+
125+
- name: Move robots
126+
run: |
127+
sudo mv robots.txt dir/robots.txt
128+
129+
- name: Setup Pages
130+
uses: actions/configure-pages@v5
131+
132+
- name: Upload artifact
133+
uses: actions/upload-pages-artifact@v3
134+
with:
135+
path: dir
136+
137+
- name: Deploy to GitHub Pages
138+
id: deployment
139+
uses: actions/deploy-pages@v4
140+
141+
deploy-indexes:
142+
environment: deploy
143+
144+
needs:
145+
- test
146+
147+
name: Deploy to Algolia
148+
runs-on: ubuntu-latest
149+
timeout-minutes: 3
150+
151+
container:
152+
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
153+
154+
steps:
155+
- name: Download search artifact
156+
uses: actions/download-artifact@v5
157+
with:
158+
name: ${{ env.ARTIFACT_INDEXES }}
159+
160+
- name: Unzip artifact
161+
run: unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d ${{ env.ARTIFACT_INDEXES }}
162+
163+
- name: Deploy to Algolia
164+
run: |
165+
env algolia-key='${{ env.ALGOLIA_KEY }}' java -jar /opt/builder/help-publication-agent.jar \
166+
update-index \
167+
--application-name '${{ env.ALGOLIA_APP_NAME }}' \
168+
--index-name '${{ env.ALGOLIA_INDEX_NAME }}' \
169+
--product '${{ env.CONFIG_JSON_PRODUCT }}' \
170+
--version '${{ env.CONFIG_JSON_VERSION }}' \
171+
--index-directory ${{ env.ARTIFACT_INDEXES }}/ \
172+
2>&1 | tee algolia-update-index-log.txt

.github/workflows/test-docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
9+
permissions: read-all
10+
11+
env:
12+
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
13+
INSTANCE: docs/laravel-feeds
14+
ARTIFACT_DOCS: webHelpLARAVEL-FEEDS2-all.zip
15+
BUILDER_VERSION: 2025.04.8412
16+
17+
jobs:
18+
test:
19+
name: Build application
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Build documentation
28+
uses: JetBrains/writerside-github-action@v4
29+
with:
30+
instance: ${{ env.INSTANCE }}
31+
artifact: ${{ env.ARTIFACT_DOCS }}
32+
docker-version: ${{ env.BUILDER_VERSION }}
33+
34+
35+
- name: Test documentation
36+
uses: JetBrains/writerside-checker-action@v1
37+
with:
38+
instance: ${{ env.INSTANCE }}

0 commit comments

Comments
 (0)