Skip to content

build

build #529

Workflow file for this run

name: build
on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Builder
uses: actions/checkout@v4
with:
path: build
ref: build
- name: Checkout Data
uses: actions/checkout@v4
with:
path: data
ref: master
- name: Parse
run: |
cd build
yarn install
yarn add qqwry.ipdb
yarn build
- name: Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ./data
cp ../build/data/cncity/* ./data/cncity/
cp ../build/data/country/* ./data/country/
cp ../build/data/special/* ./data/special/
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the output on this push; exiting."
exit 0
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git add .
git commit -m "[auto] $(date '+%Y-%m-%d %H:%M:%S')"
git push