-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard: small enhancements #20
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -15,6 +15,9 @@ on: | |
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
NEXT_PUBLIC_BASE_PATH: ${{ vars.NEXT_PUBLIC_BASE_PATH }} | ||
afinn12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
|
@@ -76,9 +79,14 @@ jobs: | |
- name: Install dependencies | ||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
|
||
- name: Build with Next.js | ||
- name: Build with Next.js (No base path) | ||
if: ${{ env.NEXT_PUBLIC_BASE_PATH == '' }} | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
|
||
- name: Build with Next.js (With base path) | ||
if: ${{ env.NEXT_PUBLIC_BASE_PATH != '' }} | ||
run: NEXT_PUBLIC_BASE_PATH=${{ env.NEXT_PUBLIC_BASE_PATH }} ${{ steps.detect-package-manager.outputs.runner }} next build | ||
Comment on lines
+82
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need a condition here. I'll fix this in another PR. |
||
|
||
- name: Add .nojekyll to out directory | ||
run: touch out/.nojekyll | ||
|
||
|
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 | ||||
---|---|---|---|---|---|---|
|
@@ -71,11 +71,21 @@ Follow these steps to set up the development environment for the Kata Containers | |||||
|
||||||
3. **Run the development server**: | ||||||
Start the Next.js development server with hot-reloading enabled. | ||||||
|
||||||
To run the script to fetch the data, a .env file must be created with an access token. This is required to authenticate our calls and increase the rate limit. To get the token, click [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) | ||||||
|
||||||
Create the .env file: | ||||||
```bash | ||||||
node scripts/fetch-ci-nightly-data.js > job_stats.json | ||||||
npm run dev | ||||||
NODE_ENV=development | ||||||
TOKEN=<GITHUB_PAT_OR_OTHER_VALID_TOKEN> | ||||||
``` | ||||||
|
||||||
Create the folder /localData. Then, run: | ||||||
|
||||||
```bash | ||||||
node scripts/fetch-ci-nightly-data.js > localData/job_stats.json | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll do this in another PR.
Suggested change
|
||||||
npm run dev # On Windows, run `npm run win-dev` instead. | ||||||
``` | ||||||
The app will be available at [http://localhost:3000](http://localhost:3000). | ||||||
|
||||||
### Production | ||||||
|
@@ -92,10 +102,11 @@ Follow these steps to set up the development environment for the Kata Containers | |||||
npm start | ||||||
``` | ||||||
|
||||||
### Scripts | ||||||
|
||||||
- **Fetch CI Nightly Data**: | ||||||
The `fetch-ci-nightly-data.js` script can be executed manually to pull the latest CI test data from the Kata Containers repository: | ||||||
```bash | ||||||
node scripts/fetch-ci-nightly-data.js > job_stats.json | ||||||
``` | ||||||
### Notes | ||||||
In deploy.yml: | ||||||
```bash | ||||||
env: | ||||||
NEXT_PUBLIC_BASE_PATH: ${{ vars.NEXT_PUBLIC_BASE_PATH }} | ||||||
``` | ||||||
If the variable is undefined, it will use "" for the basePath and assume the site is being served at root. | ||||||
This makes it easier for people to fork the repo and deploy with GitHub pages such that they can have a preview for their PR. |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some context on the changes in this file:
This allows for us to have a staging instance by hosting in another repo without constantly modifying the code