ost-data-export-update-event #47
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: Push | |
on: | |
push: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [ost-data-export-update-event] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install necessary Python packages | |
run: | | |
pip install -r requirements.txt | |
- name: Update submodules | |
run: | | |
git submodule update --remote | |
# Custom script | |
- name: Run custom prechecking | |
run: python prechecker.py | |
- name: Run main.py | |
run: python main_prod.py | |
# Push changes | |
- name: Push changes | |
run: | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
cd data_html | |
git add . | |
git commit -m "Update: ost_data_export SHA ${{ github.event.after }}" | |
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all | |
git push https://github-actions[bot]:[email protected]/BA-OST-Index/ost_data_site.git HEAD:main | |
env: | |
REPO_KEY: ${{secrets.ACTION_SCRIPT}} |