Skip to content

Commit 15b9c84

Browse files
committed
Automate site generation and deployment
1 parent accc8c4 commit 15b9c84

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and Deploy Site
2+
on: push
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
container:
7+
image: fedora:latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- run: cat /etc/os-release
12+
- name: install dependencies
13+
run: |
14+
sudo dnf -y update
15+
sudo dnf install -y lowdown make sblg
16+
- name: build site
17+
run: make
18+
- name: package site
19+
run: |
20+
mkdir site
21+
make install PREFIX=$(pwd)/site
22+
- name: Upload artifact
23+
uses: actions/upload-pages-artifact@v4
24+
with:
25+
path: site
26+
27+
deploy:
28+
needs: build
29+
30+
permissions:
31+
pages: write
32+
id-token: write
33+
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)