53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Build Quartz site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: "Fetching Quartz"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'jackyzha0/quartz'
|
|
path: 'quartz'
|
|
github-server-url: 'https://github.com'
|
|
token: ${{ secrets.GH_PAT }}
|
|
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: 'quartz/content'
|
|
fetch-depth: 0 # Fetch all history for git info
|
|
|
|
- name: "Install Node"
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18.14
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
working-directory: ./quartz
|
|
|
|
- name: Copying config
|
|
run: cp content/.github/quartz/* .
|
|
working-directory: ./quartz
|
|
|
|
- name: Build Quartz
|
|
run: npx quartz build
|
|
working-directory: ./quartz
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: output
|
|
path: ./quartz/public
|