Skip to content

Replacing the documentation generator on Jetbrains Writerside #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 2, 2025
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ tests/ export-ignore
.gitattributes export-ignore
.gitignore export-ignore

package.json export-ignore
phpunit.xml export-ignore
129 changes: 100 additions & 29 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,124 @@
name: docs
name: Documentation

on:
push:
branches:
- main
workflow_run:
workflows:
- changelog
types:
- completed
workflow_dispatch:

permissions: write-all
permissions:
id-token: write
pages: write

env:
COMPOSER_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
ARTIFACT_DOCS: webHelpDO2-all.zip
INSTANCE: docs/do
DOMAIN_NAME: deploy-operations.dragon-code.pro
BUILDER_VERSION: 2025.03.8312

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

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Build documentation
uses: JetBrains/writerside-github-action@v4
with:
node-version: '22'
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT_DOCS }}
docker-version: ${{ env.BUILDER_VERSION }}

- name: Cache dependencies
uses: actions/cache@v4
id: npm-cache
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: |
**/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
artifacts/${{ env.ARTIFACT_DOCS }}
artifacts/report.json
retention-days: 7

- name: Install dependencies
run: npm i
test:
needs: build
name: Testing
runs-on: ubuntu-latest

- name: Build VuePress site
run: npm run build
steps:
- name: Download docs artifact
uses: actions/download-artifact@v4
with:
name: docs
path: artifacts

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v4.2.0
- 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:
target_branch: gh-pages
build_dir: docs/.vuepress/dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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@v4
with:
name: docs

- name: Download robots artifact
uses: actions/download-artifact@v4
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
4 changes: 0 additions & 4 deletions docs/.vuepress/.gitignore

This file was deleted.

119 changes: 0 additions & 119 deletions docs/.vuepress/config.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/.vuepress/public/CNAME

This file was deleted.

Binary file removed docs/.vuepress/public/fonts/Nunito-SemiBold.woff2
Binary file not shown.
9 changes: 0 additions & 9 deletions docs/.vuepress/styles/_fonts.scss

This file was deleted.

17 changes: 0 additions & 17 deletions docs/.vuepress/styles/index.scss

This file was deleted.

49 changes: 49 additions & 0 deletions docs/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE buildprofiles SYSTEM "https://resources.jetbrains.com/writerside/1.0/build-profiles.dtd">
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<variables>
<generate-canonicals>true</generate-canonicals>
<locale-code>en_US</locale-code>
<header-logo>logo.svg</header-logo>
<!-- <og-image> -->
<!-- https://raw.githubusercontent.com/Laravel-Lang/docs/main/docs/images/social-logo.png -->
<!-- </og-image> -->
<web-root>https://deploy-operations.dragon-code.pro</web-root>
<enable-contribution>true</enable-contribution>
<contribute-url>
https://github.com/TheDragonCode/laravel-deploy-operations/edit/main/docs/
</contribute-url>
<custom-favicons>
logo.svg,logo.svg,logo.svg,logo.svg
</custom-favicons>
<!-- <analytics-head-script-file> -->
<!-- analytics.html -->
<!-- </analytics-head-script-file> -->
<versions-switcher>
https://raw.githubusercontent.com/TheDragonCode/laravel-deploy-operations/refs/heads/main/docs/versions.json
</versions-switcher>
</variables>
<build-profile instance="do">
<variables>
<product-web-url>https://deploy-operations.dragon-code.pro/</product-web-url>
<noindex-content>false</noindex-content>
<!-- <og-image> -->
<!-- https://raw.githubusercontent.com/TheDragonCode/laravel-deploy-operations/main/docs/images/social-logo.png -->
<!-- </og-image> -->
</variables>
</build-profile>
<sitemap priority="0.5" change-frequency="weekly" />
<footer>
<social type="github" href="https://github.com/TheDragonCode">
GitHub
</social>
<link href="https://boosty.to/dragon-code">
Boosty
</link>
<link href="https://github.com/TheDragonCode/laravel-deploy-operations/issues">
Issues
</link>
</footer>
</buildprofiles>
Loading