Skip to content

Deploy to Pages

Deploy to Pages #192

Workflow file for this run

name: Deploy to Pages
on:
push:
branches:
- master
schedule:
- cron: '0 11 * * 0,1,2,3,4,5,6'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build
run: npm install
working-directory: brianl.am
- name: Build Notion Data Package
run: npm install
working-directory: notion-data
- name: Fetch Today Queens Save to Notion
working-directory: notion-data
env:
NOTION_TOKEN: ${{secrets.NOTION_TOKEN}}
run: |
echo "NOTION_TOKEN=$NOTION_TOKEN" > .env
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
npm run scrape-li
- name: Fetch Notion Data
working-directory: notion-data
env:
NOTION_TOKEN: ${{secrets.NOTION_TOKEN}}
run: |
echo "NOTION_TOKEN=$NOTION_TOKEN" > .env
npm run fetch-status
- name: Fetch Notion Board Data
working-directory: notion-data
env:
NOTION_TOKEN: ${{secrets.NOTION_TOKEN}}
run: |
echo "NOTION_TOKEN=$NOTION_TOKEN" > .env
npm run fetch-boards
- name: Deploy
working-directory: brianl.am
env:
NAME: lambrian
EMAIL: brianlam93@gmail.com
run: |
git config --global user.email $EMAIL
git config --global user.name $NAME
git remote set-url origin https://$NAME:${{ secrets.PAT_TOKEN }}@github.com/lambrian/lambrian.github.io.git
npm run deploy