summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorseth <[email protected]>2024-05-22 22:00:02 -0400
committerseth <[email protected]>2024-05-22 20:45:24 -0600
commit8fd8b7e53d59a034706dd7eaad6b608721ce3cdb (patch)
tree2ce7e4a8b7eafc9d8550a54aa6d4f34d678d76f5 /.github
parent329bf8a3384474cfe45ecae142dfb7d97b699aa2 (diff)
move to zola
Diffstat (limited to '.github')
-rwxr-xr-x.github/build_site.sh7
-rw-r--r--.github/dependabot.yml9
-rw-r--r--.github/workflows/autobot.yaml28
-rw-r--r--.github/workflows/ci.yaml62
-rw-r--r--.github/workflows/nix.yaml25
-rw-r--r--.github/workflows/update-flake.yaml9
6 files changed, 40 insertions, 100 deletions
diff --git a/.github/build_site.sh b/.github/build_site.sh
index b4a0455..bc1df9e 100755
--- a/.github/build_site.sh
+++ b/.github/build_site.sh
@@ -5,9 +5,10 @@
set -euo pipefail
function build_site {
- pnpm install --frozen-lockfile
- pnpm run ci
- pnpm run build
+ asdf plugin add zola https://github.com/salasrod/asdf-zola
+ asdf install zola 0.17.2
+ asdf global zola 0.17.2
+ zola build --output-dir dist
}
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index ae20cd0..4c39a33 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,11 +5,4 @@ updates:
schedule:
interval: "weekly"
commit-message:
- prefix: "deps(actions)"
-
- - package-ecosystem: "npm"
- directory: "/"
- schedule:
- interval: "weekly"
- commit-message:
- prefix: "deps(node)"
+ prefix: "ci"
diff --git a/.github/workflows/autobot.yaml b/.github/workflows/autobot.yaml
deleted file mode 100644
index 27766c3..0000000
--- a/.github/workflows/autobot.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Auto-merge Dependabot
-
-on: pull_request
-
-jobs:
- automerge:
- name: Check and merge PR
- runs-on: ubuntu-latest
-
- permissions:
- actions: write
- contents: write
- pull-requests: write
-
- if: github.actor == 'dependabot[bot]'
-
- steps:
- - uses: dependabot/fetch-metadata@v2
- id: metadata
- with:
- github-token: ${{ github.token }}
-
- - name: Enable auto-merge
- if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
- run: gh pr merge --auto --rebase "$PR"
- env:
- GH_TOKEN: ${{ github.token }}
- PR: ${{ github.event.pull_request.html_url }}
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index c3254f4..9f3980f 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -6,51 +6,43 @@ on:
pull_request:
workflow_dispatch:
-env:
- NODE_VERSION: 20
-
jobs:
ci:
- strategy:
- matrix:
- include:
- - name: Build
- command: build
- - name: Check
- command: ci
-
- name: ${{ matrix.name }}
+ name: Build site
+
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - name: Checkout repository
+ uses: actions/checkout@v4
- - name: Setup node.js
- uses: actions/setup-node@v4
- with:
- node-version: ${{ env.NODE_VERSION }}
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v11
- - name: Install pnpm
- run: |
- corepack enable
- corepack prepare --activate
+ - name: Setup cache
+ uses: DeterminateSystems/magic-nix-cache-action@v6
- - name: Get store directory
+ - name: Build site
run: |
- echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"
+ nix build --print-build-logs
- - name: Setup pnpm cache
- uses: actions/cache@v4
- with:
- path: ${{ env.STORE_PATH }}
- key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-pnpm-store-
+ check-and-lint:
+ name: Check & lint
- - name: Install dependencies
- run: |
- pnpm install --frozen-lockfile
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v11
+
+ - name: Setup cache
+ uses: DeterminateSystems/magic-nix-cache-action@v6
- - name: Run ${{ matrix.command }}
+ - name: Run checks
run: |
- pnpm run ${{ matrix.command }}
+ nix flake check \
+ --print-build-logs \
+ --show-trace
diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml
deleted file mode 100644
index ec58c22..0000000
--- a/.github/workflows/nix.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Nix
-
-on:
- push:
- branches: [main]
- pull_request:
- workflow_dispatch:
-
-jobs:
- check:
- name: Check flake
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@v11
-
- - name: Setup cache
- uses: DeterminateSystems/magic-nix-cache-action@v6
-
- - name: Run check
- run: |
- nix flake check -L --show-trace
diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml
index 8d72f98..075d42b 100644
--- a/.github/workflows/update-flake.yaml
+++ b/.github/workflows/update-flake.yaml
@@ -8,6 +8,8 @@ on:
jobs:
update:
+ name: Run update
+
runs-on: ubuntu-latest
permissions:
@@ -15,7 +17,8 @@ jobs:
pull-requests: write
steps:
- - uses: actions/checkout@v4
+ - name: Checkout repository
+ uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v11
@@ -23,3 +26,7 @@ jobs:
- name: Update lockfile & make PR
uses: DeterminateSystems/update-flake-lock@v21
id: update
+ with:
+ commit-msg: "flake: update inputs"
+ pr-title: "flake: update inputs"
+ token: ${{ github.token }}