-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.23 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
permissions:
contents: write # Grant permission to push changes to the repository
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-html
npm install --global tutors-json
- name: Build site
run: |
cd build
tutors-json
tutors-html
- name: Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/public-site