Skip to content

Commit 6f57f77

Browse files
committed
Initial org root landing page
0 parents  commit 6f57f77

File tree

6 files changed

+136
-0
lines changed

6 files changed

+136
-0
lines changed

.github/workflows/website.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Upload
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
build-pages:
16+
if: github.ref == 'refs/heads/master'
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: cachix/install-nix-action@v30
20+
with:
21+
nix_path: nixpkgs=channel:nixos-unstable
22+
- uses: cachix/cachix-action@v15
23+
with:
24+
name: pyproject-nix
25+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
26+
- uses: actions/[email protected]
27+
- name: Run build
28+
run: nix build -L -v
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: ./result
33+
34+
deploy-pages:
35+
if: github.ref == 'refs/heads/master'
36+
needs: build-pages
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

default.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
self ? ./.,
3+
runCommand,
4+
pandoc,
5+
}:
6+
runCommand "pyproject-nix-website"
7+
{
8+
nativeBuildInputs = [
9+
pandoc
10+
];
11+
}
12+
''
13+
mkdir $out
14+
pandoc ${self}/website.md > $out/index.html
15+
''

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
4+
};
5+
6+
outputs =
7+
{
8+
self,
9+
nixpkgs,
10+
...
11+
}:
12+
let
13+
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
14+
inherit (nixpkgs) lib;
15+
16+
in
17+
{
18+
devShells = forAllSystems (
19+
system:
20+
let
21+
pkgs = nixpkgs.legacyPackages.${system};
22+
in
23+
{
24+
default = pkgs.callPackage ./shell.nix { };
25+
}
26+
);
27+
28+
packages = forAllSystems (
29+
system:
30+
let
31+
pkgs = nixpkgs.legacyPackages.${system};
32+
in
33+
{
34+
default = pkgs.callPackage ./. { inherit self; };
35+
}
36+
);
37+
};
38+
}

shell.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
pkgs ? import <nixpkgs> { },
3+
}:
4+
pkgs.mkShell {
5+
packages = [
6+
pkgs.pandoc
7+
];
8+
}

website.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Pyproject.nix project documentation
2+
3+
- [pyproject.nix](https://pyproject-nix.github.io/pyproject.nix/)
4+
- [uv2nix](https://pyproject-nix.github.io/uv2nix/)

0 commit comments

Comments
 (0)