Skip to content

Commit

Permalink
Merge pull request #25 from jacobfilik/locationenv
Browse files Browse the repository at this point in the history
Locationenv
  • Loading branch information
jacobfilik authored Oct 18, 2024
2 parents 1792905 + d41cdc1 commit f4f1d1a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Set env
run: echo "{VITE_XDI_REPO_LOCATION}={$DATA_REPO}" >> $GITHUB_ENV
- name: Run build
run: pnpm run build --base=/webxdiviewer/
- name: Uploading production-ready build files
Expand Down
12 changes: 9 additions & 3 deletions src/components/WelcomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Link } from "react-router-dom";
import { Container, Typography, Box } from "@mui/material";

const env_repo_location = import.meta.env.VITE_SOME_KEY;

function WelcomePage() {

const repo_location = env_repo_location ?? "examplerepo/xdifiles"

console.log(repo_location)
return (
<Container maxWidth="md" sx={{ alignSelf: "center", p: "24px" }}>
<Typography variant="h4" padding="24px">
Expand All @@ -16,9 +22,9 @@ function WelcomePage() {
stored in a github repository. As part of the website build process,
the XDI files are pulled in and indexed, giving simple static website
to display open data. The website is currently pointing as a fork of
the data in the{" "}
<Link to={"https://github.com/XraySpectroscopy/XASDataLibrary"}>
XASDataLibrary
the data in{" "}
<Link to={"https://github.com/" + repo_location}>
{repo_location}
</Link>
.
</Typography>
Expand Down

0 comments on commit f4f1d1a

Please sign in to comment.