Skip to content

Deploy site to GitHub Pages #107

Deploy site to GitHub Pages

Deploy site to GitHub Pages #107

Workflow file for this run

name: Deploy site to GitHub Pages
on:
push:
branches:
- master
schedule:
- cron: '0 21 * * *' # update content every day at 21:00
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- shell: bash
env:
MY_ZETTELKASTEN_URL: ${{ secrets.MY_ZETTELKASTEN_URL }}
run: |
git clone "$MY_ZETTELKASTEN_URL"
mkdir -p content
mv my-zettelkasten/assets content/assets
mv my-zettelkasten/wiki/* content
- uses: actions/setup-node@v3
with:
node-version: 18.14
- name: Install Dependencies
run: npm ci
- name: Build Quartz
run: npx quartz build
- 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: Setup Pages
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2