forked from sigstore/rekor-search-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(build): switch from getServerSideProps to getInitialProps (#56)
- Loading branch information
Showing
7 changed files
with
45 additions
and
23 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 |
---|---|---|
|
@@ -29,8 +29,8 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4.1.3 | ||
- name: Detect package manager | ||
id: detect-package-manager | ||
run: | | ||
|
@@ -74,15 +74,15 @@ jobs: | |
- name: Install dependencies | ||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | ||
- name: Build with Next.js | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
run: ${{ steps.detect-package-manager.outputs.runner }} build && touch ./out/.nojekyll | ||
env: | ||
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN: ${{ secrets.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN }} | ||
# - name: Static HTML export with Next.js | ||
# run: ${{ steps.detect-package-manager.outputs.runner }} next export | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./out | ||
# - name: Upload artifact | ||
# uses: actions/upload-pages-artifact@v4 | ||
# with: | ||
# path: ./out | ||
|
||
# Deployment job | ||
deploy: | ||
|
@@ -92,6 +92,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@v4 | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: main | ||
folder: out |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
# production | ||
/build | ||
/.next | ||
out | ||
|
||
# misc | ||
.DS_Store | ||
|
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
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,20 @@ | ||
import type { AppProps } from "next/app"; | ||
import "@patternfly/react-core/dist/styles/base.css"; | ||
import { NextPageContext } from "next"; | ||
|
||
function App({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} />; | ||
} | ||
|
||
App.getInitialProps = async (_ctx: NextPageContext) => { | ||
return { | ||
props: { | ||
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN: process.env | ||
.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN | ||
? process.env.NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN | ||
: null, | ||
}, // gets passed to the page component as props | ||
}; | ||
}; | ||
|
||
export default App; |
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