mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2026-04-22 22:57:04 +08:00
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
# SPDX-FileCopyrightText: 2023-2025 Steffen Vogel <post@steffenvogel.de>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
|
|
---
|
|
name: Build website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_call:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build website
|
|
runs-on: nix
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
uses: https://code.forgejo.org/actions/checkout@v5
|
|
|
|
- name: Load Environment
|
|
env:
|
|
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
|
|
run: |
|
|
nix run nixpkgs#direnv -- allow .
|
|
nix shell nixpkgs#age nixpkgs#sops nixpkgs#direnv --command direnv export gha > "$GITHUB_ENV"
|
|
|
|
- name: Build Website
|
|
run: |
|
|
nix build .#website
|
|
|
|
- name: Build Website
|
|
run: nix build .
|
|
|
|
- name: Publish Website
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
run: nix run .#website.publish
|