update #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Logseq Site | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow when pushing to the 'main' branch | |
workflow_dispatch: # Allow manual triggering of the workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Fetch the entire history to enable the push to gh-pages | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Run logseq Python script | |
run: python template/logseq.py logseq/ build/ template/ | |
- name: Setup Node.js | |
uses: actions/setup-node@v3.6.0 | |
with: | |
node-version: '20.x' | |
- name: Install tutors-html | |
run: | | |
npm install --global tutors-json | |
- name: Build site | |
run: | | |
cd build | |
tutors-json | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build/public-site # Folder containing the generated website | |