Skip to content

Commit b644fba

Browse files
committed
Initial org root landing page
0 parents  commit b644fba

File tree

6 files changed

+137
-0
lines changed

6 files changed

+137
-0
lines changed

.github/workflows/website.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
needs: collect
19+
steps:
20+
- uses: cachix/install-nix-action@v30
21+
with:
22+
nix_path: nixpkgs=channel:nixos-unstable
23+
- uses: cachix/cachix-action@v15
24+
with:
25+
name: pyproject-nix
26+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27+
- uses: actions/[email protected]
28+
- name: Run build
29+
run: nix build -L -v
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: ./result
34+
35+
deploy-pages:
36+
if: github.ref == 'refs/heads/master'
37+
needs: build-pages
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
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)