-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also includes a nix-based dev env for build tooling, which will install requirements like `pnpm` and `firebase-tools`. Opts in to creating a fully static export of the site. Requires that we disable image optimization, which only works with a server on the backend. Uses the firebase-generated github action workflows to deploy to static-site hosting.
- Loading branch information
Showing
12 changed files
with
245 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "penumbra-guide" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
# | ||
# It will build the static site and deploy it to the live prod URL. | ||
|
||
name: Deploy to Firebase Hosting on merge | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: load nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: build static docroot | ||
run: nix develop --command just build | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_GUIDE }} | ||
channelId: live | ||
projectId: penumbra-guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
# | ||
# It will build the static site, deploy it to an ephemeral URL, and post a comment | ||
# to the PR with that URL for review. | ||
|
||
name: Deploy to Firebase Hosting on PR | ||
on: pull_request | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
build_and_preview: | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: install nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
- name: load nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: build static docroot | ||
run: nix develop --command just build | ||
|
||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PENUMBRA_GUIDE }} | ||
projectId: penumbra-guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Penumbra Guide | ||
|
||
This repo holds the end-user documentation for Penumbra, hosted at [https://guide.penumbra.zone](https://guide.penumbra.zone). | ||
|
||
## Contributing | ||
|
||
1. Install [nix](https://nixos.org/download/). | ||
2. Run `nix develop --enable-experimental-features "nix-command flake"` | ||
3. Run `just dev` for a livereload environment. | ||
|
||
## Directory layout | ||
|
||
The documentation source resides in `pages/`. Docs files are written in [Markdown](https://www.markdownguide.org/), | ||
and served via [Nextra](https://nextra.site/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"hosting": { | ||
"public": "out", | ||
"redirects": [ | ||
{ | ||
"source": "/main/index.html", | ||
"destination": "/", | ||
"type": 302 | ||
}, | ||
{ | ||
"regex": "/main/pd(?P<page>.*)", | ||
"destination": "/node/pd:page", | ||
"type": 302 | ||
}, | ||
{ | ||
"regex": "/main/pclientd(?P<page>.*)", | ||
"destination": "/node/pclientd:page", | ||
"type": 302 | ||
}, | ||
{ | ||
"regex": "/main/(?P<page>.*)", | ||
"destination": "/:page", | ||
"type": 302 | ||
}, | ||
{ | ||
"source": "/node/pd/join-testnet.html", | ||
"destination": "/node/pd/join-network.html", | ||
"type": 302 | ||
} | ||
] | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# in flake.nix | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem | ||
(system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system ; | ||
}; | ||
in | ||
with pkgs; | ||
{ | ||
devShells.default = mkShell { | ||
buildInputs = [ | ||
firebase-tools | ||
just | ||
pnpm | ||
]; | ||
}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# display this help menu | ||
list: | ||
@just --list | ||
|
||
# build static site | ||
build: | ||
pnpm install && pnpm build | ||
|
||
# run dev env with livereload, for local editing | ||
dev: | ||
pnpm dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.