💵 Get the prices #1196
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: 💵 Get the prices | |
on: | |
schedule: | |
- cron: 0 22 * * * | |
workflow_dispatch: | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get latest prices | |
uses: denoland/setup-deno@main | |
with: | |
deno-version: v1.10.x | |
- run: | | |
API_TOKEN=${{ secrets.API_TOKEN }} deno run --allow-net --allow-env --allow-write --allow-read --unstable scripts/fetch.ts | |
git config user.name jcaromiq | |
git config user.email [email protected] | |
git add . | |
git commit -m "get prices for today" || true | |
git push | |
- name: 📂 Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
local-dir: ./public/data/ | |
server-dir: /luz/data/ | |
server: ${{ secrets.ftp_server }} | |
username: ${{ secrets.ftp_username }} | |
password: ${{ secrets.ftp_password }} |