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:
parent
6613b6ce49
commit
f14ef40c45
1 changed files with 18 additions and 16 deletions
34
.github/workflows/github_pages.yml
vendored
34
.github/workflows/github_pages.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue