-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package: frontend init at 0.1.0 (#52)
* frontend: package webui as npmPackage * webui: add github pages workflow * webui: add remote flake support * webui: dynamic flake
- Loading branch information
Showing
10 changed files
with
6,461 additions
and
7,713 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,47 @@ | ||
name: Deploy to Pages | ||
|
||
# Runs on pushes targeting things that look like the default branch | ||
on: | ||
push: | ||
branches: ["main", "master"] | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Nix | ||
uses: nixbuild/nix-quick-install-action@v28 | ||
with: {load_nixConfig: false} | ||
- name: Build site | ||
run: nix build .#frontend --print-build-logs | ||
- name: Adjust permissions | ||
run: | | ||
chown -R `id -u`:`id -g` ./result | ||
chmod -R a+rwx ./result | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./result | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,25 @@ | ||
{ buildNpmPackage | ||
, nodejs | ||
, ... | ||
}: | ||
buildNpmPackage { | ||
name = "HomestakerOS-frontend"; | ||
version = "0.1.0"; | ||
|
||
# The packages required by the build process | ||
buildInputs = [ | ||
nodejs | ||
]; | ||
|
||
# The code sources for the package | ||
src = ./.; | ||
npmDepsHash = "sha256-fvSXDXYj/HF73QAu10AhNVJogBp4l5RTW1fjZ37mWKQ"; | ||
|
||
npmBuild = "npm run build"; | ||
|
||
# How the output of the build phase | ||
installPhase = '' | ||
mkdir $out | ||
cp -r dist/* $out | ||
''; | ||
} |
Oops, something went wrong.