Skip to content

Build and Deploy

Build and Deploy #79

name: Build and Deploy
on:
workflow_dispatch:
push:
branches: [master]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Export secret as .env
run: |
echo "AIRTABLE_API_KEY=${{ secrets.AIRTABLE_API_KEY }}" >> .env
echo "AIRTABLE_CLIENT_SECRET=${{ secrets.AIRTABLE_CLIENT_SECRET }}" >> .env
echo "NOCODB_AUTH_TOKEN=${{ secrets.NOCODB_AUTH_TOKEN }}" >> .env
echo "NOCODB_API_KEY=${{ secrets.NOCODB_API_KEY }}" >> .env
- name: Build 🔧
run: |
yarn build
yarn export
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: out # The folder the action should deploy.