The LokasWiki Actions repository contains a collection of GitHub Actions workflows and scripts designed to automate various tasks related to the LokasBot bot. These workflows are used to manage deployments, automate testing, and handle other repetitive tasks efficiently.
The LokasWiki Actions repository provides essential GitHub Actions workflows for continuous integration and deployment (CI/CD) of the LokasBot project. It helps automate the process of updating, testing, and deploying the bot, ensuring that changes are seamlessly integrated into the production environment. 🤖✨
To install and set up the actions from this repository on your server, follow these steps:
-
Navigate to Your Tool: Change to the tool where you want to set up the actions:
become lokasbot cd $HOME
-
Remove the Existing
actions
Directory: Remove any existing directory to ensure a clean setup:rm -rf $HOME/actions
- Clone the LokasWiki Actions Repository:
Clone the repository containing the actions workflows into the
actions
directory:git clone https://github.com/LokasWiki/actions.git $HOME/actions
- Set Execute Permissions:
Change permissions of the scripts to make them executable:
chmod -R +x $HOME/actions
- Set Up GitHub Actions Workflows:
Ensure that the workflow files are correctly configured in the
.github/workflows
directory. Customize these files as needed for your specific requirements.
After setting up the repository and workflows, GitHub Actions will automatically handle the tasks defined in the workflow files. You can monitor and manage the workflows from the GitHub Actions tab in your GitHub repository.
- Automatic Triggers: Workflows will run automatically based on events like pushes, pull requests, or scheduled triggers.
- Manual Triggers: You can also manually trigger workflows from the GitHub Actions tab.
Configuration of GitHub Actions can be done via the workflow YAML files located in the .github/workflows
directory. Customize these files according to your project's needs.
.github/workflows/main.yml
: Main workflow file for automated tasks..github/actions/setup.sh
: Script for setting up the environment.
The following is an example of a GitHub Actions workflow for deploying code to a server using SSH:
name: add_ssh_deploy_server.yml
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy to server (lokasbot)
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
request_pty: true
script_stop: true
key: ${{ secrets.KEY }}
script: |
become lokasbot sh -c "rm -rf action_temp; git clone https://github.com/LokasWiki/actions.git action_temp; chmod +x action_temp/lokasbot/pull.sh; action_temp/lokasbot/pull.sh"
become lokasbot2 sh -c "rm -rf action_temp; git clone https://github.com/LokasWiki/actions.git action_temp; chmod +x action_temp/lokasbot2/pull.sh; action_temp/lokasbot2/pull.sh"
This workflow will deploy the latest changes from the main
branch to the specified servers using SSH. It ensures that the code is up-to-date and ready for use.
We welcome contributions to the LokasWiki Actions repository! If you have suggestions, improvements, or bug fixes, please follow these steps to contribute:
-
Fork the Repository: Create a personal fork of the repository on GitHub.
-
Create a New Branch: Work on your changes in a separate branch.
-
Submit a Pull Request: Push your changes and open a pull request to the main repository, describing your changes and the improvements.
This project is licensed under the MIT License. See the LICENSE file for more details.
For any questions or support, please contact [email protected].