1
0
mirror of https://github.com/NuschtOS/search.git synced 2024-11-24 04:19:07 +01:00
search/.github/workflows/gh-pages.yaml

48 lines
1.1 KiB
YAML

name: "pages"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
actions: read
contents: read
pages: write
id-token: write
deployments: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build search
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
- uses: DeterminateSystems/magic-nix-cache-action@v8
with:
diagnostic-endpoint: false
use-flakehub: false
- name: Build search
run: nix build -L github:NuschtOS/search.nuschtos.de --override-input search .
- name: Publish to Cloudflare Pages
if: "github.repository_owner == 'NuschtOS'"
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2a09613716e511a8fe8ca74abc084762
projectName: nuschtos-search
directory: result
gitHubToken: ${{ github.token }}