Description
<aside>
💡 The following project creates a step-by-step tutorial (posted on Medium) on how to use GitHub Actions and Python for automation. As part of the project an X (former Twitter) BOT was created by scraping data from a website, consuming the X API and posting daily about Brazilian Holidays.
</aside>
Keywords
- Python
- Web scrap
- CI/CD (GitHub Actions)
- API
Task List
- Setting up the environment for your BOT
- Create a Twitter account
- Set it as an automated Account
- Create a Twitter Developer Account
- Set up to get API and CLIENT SECRET and KEY
- Create a new GitHub Repository
- Set Twitter API secrets as GitHub Environment Secrets
- CI/CD and GitHub Actions
- Create .github/workflows/ path in your repository
- Create .yml
- Set triggers
- Set a runner image
- Set Python version(s)
- Set job
- Set requirements.txt
- Load Environment Keys into .yml
- Set runner to execute your main.py file
- Python files
- Create a func.py file (or any other .py files)
- Check your requirements.txt and imported libs
- Load Environment Keys
- Instantiate tt.Client()
- Create the main.py file
- Import everything into main.py
- Check name
- Set main.py to run your functions
- Test your pipeline by committing/pushing
Final Product
Dia de que? (@DiadequeDia) on X
External Links
- GitHub repository
GitHub - gabrielbelolima/ttBot
- Medium step-by-step tutorials
Eng version