diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 82dfb413e..d6ec1b6a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ on: HEROKU_EMAIL: description: "Heroku email address" required: true - HK_TEAM_NAME: + HEROKU_TEAM_NAME: description: "Heroku Team Name" required: false BOT_TOKEN: @@ -30,22 +30,41 @@ on: TELEGRAM_HASH: description: "Telegram HASH from https://my.telegram.org/" required: true + jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout deploy branch uses: actions/checkout@v2 - with: - ref: "refs/heads/deploy" + + - name: Delete unnecessary directories and files + run: | + # Directories to delete + for dir in bot qBittorrent web; do + if [ -d "./$dir" ]; then + echo "Deleting directory: $dir" + rm -rf ./$dir + else + echo "Directory not found: $dir" + fi + done + + # Delete a2c.conf if it exists + if [ -f "./a2c.conf" ]; then + echo "Deleting file: a2c.conf" + rm -f ./a2c.conf + else + echo "File not found: a2c.conf" + fi - name: Deploy to Heroku - uses: 5hojib/heroku-deploy-action@v1.0.1 + uses: 5hojib/heroku-deploy-action@v2 with: heroku_api_key: ${{inputs.HEROKU_API_KEY}} heroku_app_name: ${{inputs.HEROKU_APP_NAME}} heroku_email: ${{inputs.HEROKU_EMAIL}} - team: ${{ inputs.HK_TEAM_NAME != '' && format('team={0}', inputs.HK_TEAM_NAME) || '' }} + team: ${{ inputs.HEROKU_TEAM_NAME != '' && format('team={0}', inputs.HEROKU_TEAM_NAME) || '' }} usedocker: true docker_heroku_process_type: web stack: "container" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..25d67d90e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM 5hojib/aeon:latest + +WORKDIR /usr/src/app +RUN chmod 777 /usr/src/app + +COPY requirements.txt . +RUN pip3 install --break-system-packages --ignore-installed --no-cache-dir -r requirements.txt + +COPY . . +CMD ["bash", "start.sh"] diff --git a/README.md b/README.md index 8757425ee..46776f4fc 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,73 @@ -*** ![](https://github.com/5hojib/5hojib/raw/main/images/Aeon-MLTB.gif) -*** +--- + +# Aeon Bot + +Aeon is a streamlined and feature-rich bot designed for efficient deployment and enhanced functionality. + +--- ## Features -- **Streamlined Code**: Unnecessary features and code have been removed for a more efficient and minimalistic bot. -- **Heroku Deployment**: Fully configured for easy deployment on Heroku. -- **Enhanced Functionality**: Includes additional features from various sources, improving the bot's overall capabilities. +- **Minimalistic and Optimized**: Simplified by removing unnecessary code for better performance. +- **Effortless Deployment**: Fully configured for quick and easy deployment to Heroku. +- **Enhanced Capabilities**: Integrates features from multiple sources to provide a versatile bot experience. + +--- + +## Deployment Instructions (Heroku) +Follow these steps to deploy Aeon to Heroku: -## Heroku Deployment Instructions +### 1. Fork and Star the Repository +- Click the **Fork** button at the top-right corner of this repository. +- Give the repository a star to show your support. -1. **Fork and Star the Repository** - - Start by forking and starring this repository. - - When forking, ensure that the option "Copy the default branch only" is unchecked before forking the repository. +### 2. Navigate to Your Forked Repository +- Access your forked version of this repository. -2. **Navigate to Your Forked Repository** - - Once the repository is forked, navigate to your forked repository. +### 3. Enable GitHub Actions +- Go to the **Settings** tab of your forked repository. +- Enable **Actions** by selecting the appropriate option in the settings. -3. **Access the Settings** - - Go to the settings of your forked repository. - - Enable all actions in the settings. +### 4. Run the Deployment Workflow +1. Open the **Actions** tab. +2. Select the `Deploy to Heroku` workflow from the available list. +3. Click **Run workflow** and fill out the required inputs: + - **BOT_TOKEN**: Your Telegram bot token. + - **OWNER_ID**: Your Telegram ID. + - **DATABASE_URL**: MongoDB connection string. + - **TELEGRAM_API**: Telegram API ID (from [my.telegram.org](https://my.telegram.org/)). + - **TELEGRAM_HASH**: Telegram API hash (from [my.telegram.org](https://my.telegram.org/)). + - **HEROKU_APP_NAME**: Name of your Heroku app. + - **HEROKU_EMAIL**: Email address associated with your Heroku account. + - **HEROKU_API_KEY**: API key from your Heroku account. + - **HEROKU_TEAM_NAME** (Optional): Required only if deploying under a Heroku team account. -4. **Run Action Workflow** - - Go to the **Actions** tab. - - Select the `Deploy to Heroku` action from the list of workflows. - - Click on **Run workflow**. - - Fill in the following variables in the form: - - `BOT_TOKEN` - - `OWNER_ID` - - `DATABASE_URL` - - `TELEGRAM_API` - - `TELEGRAM_HASH` - - `HEROKU_APP_NAME` - - `HEROKU_EMAIL` - - `HEROKU_API_KEY` - - Run the action workflow. +4. Run the workflow and wait for it to complete. -5. **Finalize the Deployment** - - After the deployment is complete, finalize the remaining variables. - - Upload sensitive files like `token.pickle` using the `/botsettings` command. +### 5. Finalize Setup +- After deployment, configure any remaining variables in your Heroku dashboard. +- Use the `/botsettings` command to upload sensitive files like `token.pickle` if needed. +--- ## Contributing -Feel free to submit pull requests and open issues for any bugs or feature requests. Contributions are always welcome! +We welcome contributions! Whether it's bug fixes, feature enhancements, or general improvements: +- **Report issues**: Open an issue for bugs or suggestions. +- **Submit pull requests**: Share your contributions with the community. +--- ## License -This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. +This project is licensed under the MIT License. Refer to the [LICENSE](LICENSE) file for details. +--- ## Acknowledgements -- Thanks to the original developers of the Mirror-Leech-Telegram-Bot. -- Contributions and feature integrations from various repositories. +- Special thanks to the original developers of the [Mirror-Leech-Telegram-Bot](https://github.com/anasty17/mirror-leech-telegram-bot). +- Gratitude to contributors from various repositories whose features have been integrated into Aeon. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..9777d75d5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,43 @@ +aiohttp +aiofiles +aioshutil +anytree==2.8.0 +apscheduler +aria2p +asyncio +beautifulsoup4 +bencoding +cinemagoer +cloudscraper +dnspython +electrogram +feedparser +flask +gevent +google-api-python-client +google-auth-httplib2 +google-auth-oauthlib +gunicorn +httpx +langcodes +lxml +motor +mutagen +markdown +natsort +pillow +psutil +pybase64 +pycountry +python-dotenv +pyshorteners +python-magic +qbittorrent-api +requests +speedtest-cli +telegraph +tenacity +uv +uvloop +xattr +yt-dlp[default] diff --git a/sample_config.env b/sample_config.env new file mode 100644 index 000000000..0abbbb333 --- /dev/null +++ b/sample_config.env @@ -0,0 +1,7 @@ +OWNER_ID = "" +TELEGRAM_API = "" +TELEGRAM_HASH = "" +DATABASE_URL = "" + +UPSTREAM_REPO = "https://github.com/5hojib/Aeon" +UPSTREAM_BRANCH = "main" \ No newline at end of file