Skip to content

Commit 5b7176b

Browse files
Merge pull request #46 from TheDragonCode/1.x
Added documentation
2 parents a38d233 + 48eab9c commit 5b7176b

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

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