Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
* text=auto

docs/ export-ignore

.github/ export-ignore
tests/ export-ignore
workbench/ export-ignore
Expand Down
Binary file removed .github/images/idea.png
Binary file not shown.
171 changes: 171 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: Documentation

on:
push:
branches:
- main
workflow_dispatch:

permissions:
id-token: write
pages: write

env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
ALGOLIA_APP_NAME: ${{ secrets.ALGOLIA_APPLICATION_ID }}
ALGOLIA_ARTIFACT: algolia-indexes-LARAVEL-FEEDS.zip
ALGOLIA_INDEX_NAME: laravel-feeds
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
ARTIFACT_DOCS: webHelpLARAVEL-FEEDS2-all.zip
ARTIFACT_INDEXES: search-indexes
CONFIG_JSON_PRODUCT: LARAVEL-FEEDS
CONFIG_JSON_VERSION: main
INSTANCE: docs/laravel-feeds
DOMAIN_NAME: feeds.dragon-code.pro
BUILDER_VERSION: 2025.04.8412

jobs:
build:
name: Build application
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build documentation
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT_DOCS }}
docker-version: ${{ env.BUILDER_VERSION }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT_DOCS }}
artifacts/report.json
retention-days: 7

- name: Upload search indexes
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_INDEXES }}
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
retention-days: 7

test:
needs: build
name: Testing
runs-on: ubuntu-latest

steps:
- name: Download docs artifact
uses: actions/download-artifact@v5
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}

robots:
needs: build
name: Generate robots.txt
runs-on: ubuntu-latest

steps:
- name: Create robots.txt
run: |
touch robots.txt
echo "User-Agent: *" >> robots.txt
echo "Disallow: " >> robots.txt
echo "Host: https://${{ env.DOMAIN_NAME }}" >> robots.txt
echo "Sitemap: https://${{ env.DOMAIN_NAME }}/sitemap.xml" >> robots.txt

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: robots
path: robots.txt
retention-days: 7

deploy-pages:
environment:
name: deploy
url: ${{ steps.deployment.outputs.page_url }}

needs:
- test
- robots

name: Deploy to pages
runs-on: ubuntu-latest

steps:
- name: Download docs artifact
uses: actions/download-artifact@v5
with:
name: docs

- name: Download robots artifact
uses: actions/download-artifact@v5
with:
name: robots

- name: Unzip artifact
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT_DOCS }}' -d dir

- name: Move robots
run: |
sudo mv robots.txt dir/robots.txt

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dir

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

deploy-indexes:
environment: deploy

needs:
- test

name: Deploy to Algolia
runs-on: ubuntu-latest
timeout-minutes: 3

container:
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3

steps:
- name: Download search artifact
uses: actions/download-artifact@v5
with:
name: ${{ env.ARTIFACT_INDEXES }}

- name: Unzip artifact
run: unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d ${{ env.ARTIFACT_INDEXES }}

- name: Deploy to Algolia
run: |
env algolia-key='${{ env.ALGOLIA_KEY }}' java -jar /opt/builder/help-publication-agent.jar \
update-index \
--application-name '${{ env.ALGOLIA_APP_NAME }}' \
--index-name '${{ env.ALGOLIA_INDEX_NAME }}' \
--product '${{ env.CONFIG_JSON_PRODUCT }}' \
--version '${{ env.CONFIG_JSON_VERSION }}' \
--index-directory ${{ env.ARTIFACT_INDEXES }}/ \
2>&1 | tee algolia-update-index-log.txt
38 changes: 38 additions & 0 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Documentation

on:
push:
branches-ignore:
- main
pull_request:

permissions: read-all

env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
INSTANCE: docs/laravel-feeds
ARTIFACT_DOCS: webHelpLARAVEL-FEEDS2-all.zip
BUILDER_VERSION: 2025.04.8412

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build documentation
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT_DOCS }}
docker-version: ${{ env.BUILDER_VERSION }}


- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}
Loading