Skip to content

SpreadSheet To Site #2814

SpreadSheet To Site

SpreadSheet To Site #2814

Workflow file for this run

name: SpreadSheet To Site
on:
schedule:
- cron: '0 1 * * *'
push:
branches:
- master
paths-ignore:
- README.md
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- name: Checkout πŸ›Ž
uses: actions/checkout@master
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup node env πŸ—
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path πŸ› 
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules πŸ“¦
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies πŸ‘¨πŸ»β€πŸ’»
run: yarn
- name: Get data from spreadsheet πŸ‘¨πŸ»β€πŸ’»
env: # Or as an environment variable
GH_API_KEY: ${{ secrets.GH_API_KEY }}
API_KEY: ${{ secrets.API_KEY }}
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
run: yarn data
- name: Run prettier
run: yarn prettier
- name: Run unit tests
run: yarn test
- name: Create local changes & push to GitHub
run: |
yarn build
yarn deploy:time
# yarn generate
# echo 'findmentor.network' > ./docs/CNAME
git add .
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Add changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true