Skip to content
Adam Kostarelas edited this page Jul 14, 2022 · 2 revisions

Welcome to the HuTasker wiki!

Getting started

Dependencies

Ensure you have npm installed.

run npm install

This guide will change with regards to the data to pages once the feature is implemented. the python requirements.txt may not be needed in the future depending on how development goes.

Cloning all the resources

Github

git clone https://github.com/AdamXweb/HuTasker.git

Airtable

Visit the production airtable base and check out the structure. Copy the base to your account.

Setting variables

Airtable

Geting API keys

Navigate to Airtable's API page and click on the newly copied base. The page will inform you of the baseID that looks something like app************ Click on the top right to show API Keys. As you scroll down you'll see a section that has text stating: Authorization: Bearer key********

Netlify

Now we need to place these keys into netlify. Create two items in your environment https://app.netlify.com/sites/YOURSITENAME/settings/deploys#environment Screenshot of environment variable location You can place the appropriate items there: 'app***' in BASEID and 'key****' in APIKEY

Next head over to https://app.netlify.com/sites/YOURSITENAME/settings/deploys#build-hooks We can name this hook github, and will use the URL here in our workflow in github. AirTable doesn't support webhooks in their automations at this stage. A workaround could be using a tool through e-mail or a workflow based on github issues. This is outside the scope of this project, but ideas to work on.

Github

Within your forked repo, navigate to Settings, then Environments under Code and Automation. Create a new environment, I named mine 'Production' Under Environment secrets, create a new one named: NETLIFY_WEBHOOK_API We then paste the unique part of the url build_hooks/unique_sequence The schedule that the workflow updates is based on a cron. It can be found at .github/workflows/schedule-netlify-build.yml Tools like cron.guru are helpful for visualising how often you'd like it to run. This tells Netlify to re-build the main branch at a time interval. Be careful as most free plans have limits on build times, so may need to schedule to once a day

More to come..