Skip to content

Commit 20e887e

Browse files
committed
add github actions workflow to build zola blog
1 parent b7c4bf6 commit 20e887e

3 files changed

Lines changed: 64 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install Zola
25+
run: |
26+
curl -s -L https://github.com/getzola/zola/releases/download/v0.19.2/zola-v0.19.2-x86_64-unknown-linux-gnu.tar.gz | tar xz
27+
sudo mv zola /usr/local/bin
28+
29+
- name: Build with Zola
30+
run: zola build
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: ./public
36+
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Zola build output
2+
public/
3+
4+
# Editor directories and files
5+
.idea/
6+
.vscode/
7+
*.swp
8+
*.swo
9+
*~
10+
11+
# OS files
12+
.DS_Store
13+
Thumbs.db
14+
15+
# Temporary files
16+
*.tmp
17+
*.temp

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The URL the site will be built for
2-
base_url = "https://cullback.github.io"
2+
base_url = "https://cullback.github.io/blog"
33

44
# Whether to automatically compile all Sass files in the sass directory
55
compile_sass = false

0 commit comments

Comments
 (0)