馃挼 Get the prices #1118
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 jcaromiq@gmail.com | |
git add . | |
git commit -m "get prices for today" || true | |
git push | |
- name: 馃搨 Sync files | |
uses: SamKirkland/FTP-Deploy-Action@4.0.0 | |
with: | |
local-dir: ./public/data/ | |
server-dir: /luz/data/ | |
server: ${{ secrets.ftp_server }} | |
username: ${{ secrets.ftp_username }} | |
password: ${{ secrets.ftp_password }} |