Skip to content

Commit 5212db3

Browse files
committed
ci: add dependabot, CI on PR, and deploy on push to main
1 parent a89786a commit 5212db3

4 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/dependabot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly

.github/workflows/ci.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: Build site
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- uses: actions/checkout@v6
14+
- uses: DeterminateSystems/determinate-nix-action@v3
15+
- name: Build
16+
run: nix develop --command zola build
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
deploy:
9+
name: Build Nix package
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
deployments: write
14+
steps:
15+
- uses: actions/checkout@v6
16+
- uses: DeterminateSystems/determinate-nix-action@v3
17+
- name: Build
18+
run: nix develop --command zola build
19+
20+
- name: Deploy
21+
env:
22+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
23+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
24+
run: nix develop --command wrangler pages deploy ./public --project-name=willbush

readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ git clone https://github.com/willbush/blog.git --recurse-submodules
1212
cd blog
1313
zola serve
1414
```
15+
16+
## Deployed via direct upload
17+
18+
I find clouldflare build and zola support janky so I use direct upload via CI:
19+
20+
https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/

0 commit comments

Comments
 (0)