Skip to content

updata data scheduled #1160

updata data scheduled

updata data scheduled #1160

name: updata data scheduled
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 7 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: node getCruxData.mjs
env:
PSIKUS: ${{ secrets.PSIKUS }}
- run: node createOrUpdateDataChart.mjs
- run: npm run build
- run: touch dist/.nojekyll
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: crux-data-${{ steps.date.outputs.date }}
branch: 'master'
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: crux.gotomi.info