Skip to content

Update about page

Update about page #58

name: Deploy to Firebase
on:
push:
branches:
- default
jobs:
build_and_deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- name: Checkout 🛎
uses: actions/checkout@master
with:
lfs: true
# https://mflash.dev/blog/2020/09/05/using-git-lfs-in-ci/
- name: Generate LFS files list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Pull LFS files
run: git lfs pull
- name: Setup node env 🏗
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: 'yarn'
- 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 firebase-tools
run: |
npm install -g firebase-tools
- name: Build app
run: |
yarn install --frozen-lockfile
yarn generate
env:
NOTION_DATABASE_CONFIG: ${{ secrets.NOTION_DATABASE_CONFIG }}
NOTION_DATABASE_NEWS: ${{ secrets.NOTION_DATABASE_NEWS }}
NOTION_DATABASE_MEETLINKS: ${{ secrets.NOTION_DATABASE_MEETLINKS }}
NOTION_DATABASE_MODALNOTICES: ${{ secrets.NOTION_DATABASE_MODALNOTICES }}
NOTION_DATABASE_APPOINTMENTCALS: ${{ secrets.NOTION_DATABASE_APPOINTMENTCALS }}
- name: Deploy to Firebase Hosting
run: |
firebase use default
firebase deploy --only hosting --token $FIREBASE_TOKEN
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}