Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenlagus committed Mar 9, 2024
1 parent 43a8780 commit 53de226
Show file tree
Hide file tree
Showing 29 changed files with 2,374 additions and 0 deletions.
107 changes: 107 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Build documentation

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
id-token: write
pages: write

env:
INSTANCE: 'Writerside/telegram-bots'
ARTIFACT: 'webHelpTELEGRAM-BOTS2-all.zip'
DOCKER_VERSION: '233.14389'
ALGOLIA_ARTIFACT: 'algolia-indexes-TELEGRAM-BOTS.zip'
ALGOLIA_APP_NAME: 'TelegramBots'
ALGOLIA_INDEX_NAME: 'TelegramBotsDocumentation'
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
CONFIG_JSON_PRODUCT: 'TelegramBots'
CONFIG_JSON_VERSION: '1.0'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build docs using Writerside Docker builder
uses: JetBrains/writerside-github-action@v4
with:
instance: ${{ env.INSTANCE }}
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Save artifact with build results
uses: actions/upload-artifact@v3
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
artifacts/report.json
artifacts/${{ env.ALGOLIA_ARTIFACT }}
retention-days: 7
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: docs
path: artifacts

- name: Test documentation
uses: JetBrains/writerside-checker-action@v1
with:
instance: ${{ env.INSTANCE }}
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: docs

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

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

- name: Package and upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dir

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

publish-indexes:
needs: [ build, test, deploy ]
runs-on: ubuntu-latest
container:
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-2
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: docs
- name: Unzip artifact
run: |
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
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 algolia-indexes/ \
2>&1 | tee algolia-update-index-log.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Telegram Bot Java Library Documentation

This project holds the documentation for https://github.com/rubenlagus/TelegramBots java library that is available on at https://rubenlagus.github.io/TelegramBotsDocumentation/

## Contributions
Feel free to fork this project, work on it and then make a pull request.
I will accept them if they add something valuable documentation.

Please, **DO NOT PUSH ANY TOKEN OR API KEY**, I will never accept a pull request with that content.

## Powered by Jetbrains
<p align="center">
<a href="https://www.jetbrains.com/?from=TelegramBots"><img src="Writerside/images/jetbrains.png" width="75"></a>
</p>

## License
MIT License

Copyright (c) 2024 Ruben Bermudez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 12 additions & 0 deletions Writerside/buildprofiles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<buildprofiles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd">
<variables>
<primary-color>aqua</primary-color>
<product-web-url>https://github.com/rubenlagus/TelegramBots</product-web-url>
<showDownloadButton>false</showDownloadButton>
<algolia-id>VZXPGERNH3</algolia-id>
<algolia-index>TelegramBotsDocumentation</algolia-index>
<algolia-api-key>426f9e87b8714e3864942ac0df30bc8d</algolia-api-key>
<web-root>https://rubenlagus.github.io/TelegramBotsDocumentation</web-root>
</variables>
</buildprofiles>
5 changes: 5 additions & 0 deletions Writerside/c.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE categories
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
<categories>
</categories>
Binary file added Writerside/images/API BOT-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Writerside/images/jetbrains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Writerside/images/replyflow_diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions Writerside/redirection-rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd">
<rules>

</rules>
28 changes: 28 additions & 0 deletions Writerside/telegram-bots.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE instance-profile
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">

<instance-profile id="telegram-bots"
name="Telegram Bots"
start-page="Telegram-Bots.topic">

<toc-element topic="Telegram-Bots.topic"/>
<toc-element topic="Handling-Bot-Tokens.md"/>
<toc-element topic="Getting-Started.md"/>
<toc-element topic="Abilities.md">
<toc-element topic="Simple-Example.md"/>
<toc-element topic="Using-Replies.md"/>
<toc-element topic="Ability-Toggle.md"/>
<toc-element topic="State-Machines.md"/>
<toc-element topic="Database-Handling.md"/>
<toc-element topic="Ability-Extensions.md"/>
<toc-element topic="Bot-Testing.md"/>
<toc-element topic="Bot-Recovery.md"/>
<toc-element topic="Advanced.md"/>
<toc-element topic="Additional-Examples.md"/>
</toc-element>
<toc-element topic="FAQ.md"/>
<toc-element topic="Changelog.md">
<toc-element topic="How-To-Update.md"/>
</toc-element>
</instance-profile>
Loading

0 comments on commit 53de226

Please sign in to comment.