1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 21:11:08 +01:00

ci: dont run github_pages on forks

Limit to not automatically run on forks and allow ad-hoc runs.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-07-15 13:09:24 -05:00
parent 6613b6ce49
commit f14ef40c45

View file

@ -3,26 +3,28 @@ on:
push: push:
branches: branches:
- master - master
workflow_dispatch:
jobs: jobs:
publish: publish:
if: github.event_name != 'schedule' || github.repository_owner == 'nix-community'
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31 - uses: cachix/install-nix-action@v31
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v16 - uses: cachix/cachix-action@v16
with: with:
name: nix-community name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: | - run: |
nix-build -A docs.html nix-build -A docs.html
cp -r result/share/doc/home-manager public cp -r result/share/doc/home-manager public
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v4 uses: peaceiris/actions-gh-pages@v4
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public