-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add flare series section, enhancements (#2948) * improvements, add series section * address comments * add research links redirects (#2953) Co-authored-by: Yuan-Ting Hsieh (謝沅廷) <[email protected]> * add web versioning (#2974) Co-authored-by: Chester Chen <[email protected]> --------- Co-authored-by: Yuan-Ting Hsieh (謝沅廷) <[email protected]> Co-authored-by: Chester Chen <[email protected]>
- Loading branch information
1 parent
ea97593
commit 80b1119
Showing
22 changed files
with
695 additions
and
295 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 |
---|---|---|
@@ -1,27 +1,34 @@ | ||
name: Deploy to GitHub Pages | ||
name: Deploy to gh-pages | ||
|
||
on: | ||
# Trigger the workflow every time you push to the `main` branch | ||
# Using a different branch name? Replace `main` with your branch’s name | ||
# Trigger the workflow if any web/** files are modified | ||
push: | ||
branches: [ main ] | ||
# Allows you to run this workflow manually from the Actions tab on GitHub. | ||
branches: | ||
- "main" | ||
- "2.5" | ||
paths: | ||
- 'web/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
site_path: ./web | ||
version_path: / | ||
|
||
# Allow this job to clone the repo and create a page deployment | ||
permissions: | ||
contents: read | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout your repository using git | ||
- name: Update version_path for non-main branches | ||
if: ${{ github.ref_type == 'branch' && github.ref_name != 'main'}} | ||
run: echo version_path=/version/${{ github.ref_name }}/ >> $GITHUB_ENV | ||
|
||
- name: Checkout your repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
|
@@ -31,28 +38,20 @@ jobs: | |
cache: npm | ||
cache-dependency-path: "${{ env.site_path }}/package-lock.json" | ||
|
||
- name: Install | ||
shell: "bash" | ||
working-directory: ${{ env.site_path }} | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
shell: "bash" | ||
working-directory: ${{ env.site_path }} | ||
|
||
- name: Build project | ||
run: npm run build | ||
env: | ||
PUBLIC_GH_BRANCH: ${{ github.ref_name }} | ||
working-directory: ${{ env.site_path }} | ||
|
||
- name: Upload Pages Artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
- name: Deploy | ||
uses: JamesIves/github-pages-[email protected] | ||
with: | ||
path: "${{ env.site_path }}/dist/" | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
branch: gh-pages | ||
folder: ${{ env.site_path }}/dist | ||
target-folder: ${{ env.version_path }} | ||
clean-exclude: version |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { defineConfig } from "astro/config"; | ||
import tailwind from "@astrojs/tailwind"; | ||
|
||
const branch = process.env.PUBLIC_GH_BRANCH; | ||
|
||
export default defineConfig({ | ||
site: "https://nvidia.github.io", | ||
base: "/NVFlare", | ||
base: branch === 'main' ? '/NVFlare' : `/NVFlare/version/${branch}`, | ||
integrations: [tailwind()], | ||
}); |
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
Oops, something went wrong.