-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78e9f3b
Showing
33 changed files
with
3,990 additions
and
0 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,45 @@ | ||
name: "build website" | ||
on: | ||
push: | ||
branches: ["main"] | ||
permissions: | ||
contents: write | ||
jobs: | ||
build-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-22.05 | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: rambip | ||
# If you chose API tokens for write access OR if you have a private cache | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
|
||
- run: nix build | ||
|
||
- uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "result/" | ||
|
||
|
||
deploy: | ||
needs: build-pages | ||
runs-on: ubuntu-latest | ||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
environment: | ||
name: github-pages | ||
# don't forget to go to the settings/environment and to allow main to push ! | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
|
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,3 @@ | ||
/dist | ||
/target | ||
result |
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,23 @@ | ||
# Adding an example | ||
Imagine you have an example named `foo` | ||
|
||
1) go inside `examples`. | ||
|
||
## create `foo.rs` | ||
This rust file has to define a `showcase() -> impl IntoView` function | ||
|
||
## create `foo.toml` | ||
Inside this file, you define: | ||
- a `description: String` field | ||
- a `features: Vec<String>` field. You can ommit the `csr` feature since it is enabled inside each example | ||
|
||
## add dependencies | ||
If you need specific dependencies, add them to `Cargo.toml` | ||
|
||
## Add `foo.css` | ||
If your example needs a specific stylesheet, add a `foo.css` file with the content you want. | ||
It is not supported right now. | ||
|
||
|
||
# How it works | ||
Look at `build.rs` and the generated `src/examples.rs`, it should make sense |
Oops, something went wrong.