Skip to content

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.

Notifications You must be signed in to change notification settings

LokasWiki/actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LokasWiki Actions 🚀

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.

Table of Contents

Introduction

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. 🤖✨

Installation 🛠️

To install and set up the actions from this repository on your server, follow these steps:

1. Create the Actions Directory 📂

  1. Navigate to Your Tool: Change to the tool where you want to set up the actions:

    become lokasbot
    cd $HOME
  2. Remove the Existing actions Directory: Remove any existing directory to ensure a clean setup:

    rm -rf $HOME/actions

2. Clone the Repository 📥

  1. 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

3. Make the Scripts Executable ✔️

  1. Set Execute Permissions: Change permissions of the scripts to make them executable:
    chmod -R +x $HOME/actions

4. Configure GitHub Actions ⚙️

  1. 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.

Usage 🚀

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.

Running Actions 🔄

  • 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 ⚙️

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.

Key Configuration Files 📄

  • .github/workflows/main.yml: Main workflow file for automated tasks.
  • .github/actions/setup.sh: Script for setting up the environment.

Example Workflow: SSH Deployment 🔧

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.

Contributing 🌟

We welcome contributions to the LokasWiki Actions repository! If you have suggestions, improvements, or bug fixes, please follow these steps to contribute:

  1. Fork the Repository: Create a personal fork of the repository on GitHub.

  2. Create a New Branch: Work on your changes in a separate branch.

  3. Submit a Pull Request: Push your changes and open a pull request to the main repository, describing your changes and the improvements.

License 📜

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact 📬

For any questions or support, please contact [email protected].

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages