Skip to content

workflow

workflow #8

Workflow file for this run

name: Quartz build&deploy
on:
push:
branches: [notes,main]
pull_request:
branches: [notes,main]
permissions:
contents: read
pages: write
id-token: write
env:
TZ: Asia/Shanghai
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
jobs:
Build-deploy:
name: Check notes and build&deploy
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v2
with:
ref: 'main'
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.19.0'
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: |
npm install
git clone -b notes https://github.com/blleng/obsidian-notes/ content
- name: Build site
run: |
npx quartz build
echo "freezing.cool" > ./public/CNAME
- name: Deploy to gh-page
uses: crazy-max/ghaction-github-pages@v3.1.0
with:
target_branch: gh-page
build_dir: ./public
jekyll: false