-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (38 loc) · 1.34 KB
/
build-and-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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.