-
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.
Merge pull request #1 from IMMM-SFA/sample/working-sankey-and-deploym…
…ent-example sveltize plotly stuff and add sample deployment action
- Loading branch information
Showing
8 changed files
with
256 additions
and
200 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,40 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./sankey_dashboard | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build | ||
env: | ||
NODE_ENV: production | ||
run: npm run build | ||
- name: Commit the build dir | ||
run: | | ||
cd build | ||
git init | ||
git add -A | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m 'deploy' -a || true | ||
- name: Push changes to gh-pages | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: gh-pages | ||
directory: build | ||
force: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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
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 |
---|---|---|
@@ -1,20 +1,27 @@ | ||
|
||
|
||
<script> | ||
const nav_items = ["home", "about"] ; | ||
// this variable will be important if deploying to a non-root url, | ||
// such as with github pages when you don't have a custom domain; | ||
// defined in `svelte.config.js` | ||
import { base } from '$app/paths'; | ||
const nav_items = ["home", "about"] ; | ||
</script> | ||
|
||
<style> | ||
</style> | ||
|
||
<div> | ||
<div id="navbar"> | ||
|
||
{#each nav_items as item} | ||
<a href="/{item}"> {item}</a> | ||
{/each} | ||
{#each nav_items as item} | ||
<a href="{base}/{item === "home" ? '' : item}">{item}</a> | ||
{/each} | ||
|
||
</div> | ||
|
||
<slot></slot> | ||
<slot/> | ||
|
||
<style> | ||
#navbar { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 2rem; | ||
} | ||
</style> |
Oops, something went wrong.