This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
Build and Deploy #1091
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8 * * *" | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v3 | |
- name: Set up Python 3 π | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: Update PIP β¨ | |
run: | | |
pip install -U wheel | |
pip install -U setuptools | |
python -m pip install -U pip | |
- name: Install requirements βοΈ | |
run: python -m pip install -r requirements.txt | |
- name: Execute main script π | |
env: | |
PERSONAL_API_KEY: ${{ secrets.PERSONAL_API_KEY }} | |
run: python main.py | |
- name: Delete repos/ folder | |
run: rm -r repos | |
- name: Update README.md π | |
run: | | |
if [[ "$(git status --porcelain)" != "" ]]; then | |
git config user.name "GitHub Action" | |
git config user.email "[email protected]" | |
git status | |
git add README.md | |
git commit -m "Update README.md" | |
git push | |
fi | |
- name: Deploy π | |
uses: JamesIves/[email protected] | |
with: | |
branch: translation_data | |
folder: for_deploy |