Export DS to Grist #167
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Export DS to Airtable | |
on: | |
workflow_dispatch: {} | |
schedule: | |
# Runs script every day at 6am | |
- cron: 0 6 * * * | |
jobs: | |
fetch-forms: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "yarn" | |
- run: yarn install | |
- run: node fetch-form-data.js | |
env: # Or as an environment variable | |
DS_API_TOKEN: ${{ secrets.DS_API_TOKEN }} | |
AIRTABLE_BASE_ID: ${{ secrets.AIRTABLE_BASE_ID }} | |
AIRTABLE_TABLE_ID: ${{ secrets.AIRTABLE_TABLE_ID }} | |
AIRTABLE_ACCESS_TOKEN: ${{ secrets.AIRTABLE_ACCESS_TOKEN }} | |
# Prevent workflow from getting disabled after 60 days of repository inactivity by making a commit every 50 days | |
# https://github.com/marketplace/actions/keepalive-workflow | |
- uses: gautamkrishnar/keepalive-workflow@v1 |