test remove data #3
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: Sync running data by push running.csv | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- running.csv | |
env: | |
# change env here | |
GITHUB_NAME: naosense | |
GITHUB_EMAIL: [email protected] | |
jobs: | |
sync: | |
name: Build | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.4 | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if: steps.pip-cache.outputs.cache-hit != 'true' | |
- name: Generate new SVG file | |
run: | | |
python main.py push | |
- name: Commit and push updated SVG file | |
run: | | |
git config --local user.email "${{ env.GITHUB_EMAIL }}" | |
git config --local user.name "${{ env.GITHUB_NAME }}" | |
git commit -a -m 'sync running data by push' || echo "nothing to commit" | |
git push || echo "nothing to push" |