Skip to content

Export DS to Grist #180

Export DS to Grist

Export DS to Grist #180

# 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 Grist
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: 20
cache: "yarn"
- run: yarn install
- run: node ds-to-grist.js
env: # Or as an environment variable
DS_API_TOKEN: ${{ secrets.DS_API_TOKEN }}
GRIST_DOC_ID: ${{ secrets.GRIST_DOC_ID }}
GRIST_TABLE_ID: ${{ secrets.GRIST_TABLE_ID }}
GRIST_ACCESS_TOKEN: ${{ secrets.GRIST_ACCESS_TOKEN }}
DS_DEMARCHE_ID: ${{ secrets.DS_DEMARCHE_ID }}
# 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