Skip to content

Deploy Quartz site to GitHub Pages #27

Deploy Quartz site to GitHub Pages

Deploy Quartz site to GitHub Pages #27

Workflow file for this run

name: Deploy Quartz site to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
GIT_USER: "Github Actions [bot]"
GIT_EMAIL: "actions@github.com"
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Echo Workspace
run: |
echo $GITHUB_WORKSPACE
echo "Current WD:" $(pwd)
- name: Checkout Quartz
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for git info
- name: Show Tree
run: |
echo "🍿 Tree:"
tree -L 2 -I "node_modules|docs|quartz"
- name: Custom User Prepare Site Scripts
run: ./_userscripts/prebuild.sh
- uses: actions/setup-node@v3
with:
node-version: 18.14
- name: Install Dependencies
run: npm ci
- name: Build Quartz
run: npx quartz build -o "public"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: public
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2