Skip to content
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

Update to Edgio v7 #256

Merged
merged 14 commits into from
Sep 26, 2023
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Deploy to Edgio hosting
env:
DEPLOY_TOKEN: ${{ secrets.EDGIO_DEPLOY_TOKEN}}
DEPLOY_TOKEN: ${{ secrets.EDGIO_V7_DEPLOY_TOKEN}}
# Deploy command automatically runs the build
run: |
npx edgio deploy -e $EDGIO_ENV --token $DEPLOY_TOKEN
npx edgio deploy --property=coh3-stats --organization=coh-stats -e $EDGIO_ENV --token $DEPLOY_TOKEN
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:

- name: Deploy to Edgio hosting
env:
DEPLOY_TOKEN: ${{ secrets.EDGIO_DEPLOY_TOKEN}}
DEPLOY_TOKEN: ${{ secrets.EDGIO_V7_DEPLOY_TOKEN}}
# Deploy command automatically runs the build
# Deploy command pulls ENV variables https://docs.edg.io/guides/basics/environments#environment-variables
run: |
npx edgio deploy -e $EDGIO_ENV --token $DEPLOY_TOKEN
npx edgio deploy --property=coh3-stats --organization=coh-stats -e $EDGIO_ENV --token $DEPLOY_TOKEN
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:

- name: Deploy to Edgio hosting
env:
DEPLOY_TOKEN: ${{ secrets.EDGIO_DEPLOY_TOKEN_PREVIEW}}
DEPLOY_TOKEN: ${{ secrets.EDGIO_V7_DEPLOY_TOKEN}}
run: |
npx edgio deploy --skip-build --site=coh3-stats --team=coh-stats --environment=$EDGIO_ENV --token $DEPLOY_TOKEN --branch=$BRANCH_NAME
npx edgio deploy --skip-build --property=coh3-stats --organization=coh-stats --environment=$EDGIO_ENV --token $DEPLOY_TOKEN --branch=$BRANCH_NAME
- uses: jwalton/gh-find-current-pr@v1
id: finder
- name: Publish Preview Link
Expand Down
20 changes: 9 additions & 11 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { withSentryConfig } = require("@sentry/nextjs");
// This file was automatically added by edgio init.
// You should commit this file to source control.
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withEdgio, withServiceWorker } = require("@edgio/next/config");
const withEdgio = require("@edgio/next/withEdgio");

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -26,18 +26,16 @@ const nextConfig = {
// },
};

const withEdgioConfig = withEdgio(
withServiceWorker({
// Output sourcemaps so that stack traces have original source filenames and line numbers when tailing
// the logs in the Edgio developer console.
edgioSourceMaps: true,
const withEdgioConfig = withEdgio({
// Output sourcemaps so that stack traces have original source filenames and line numbers when tailing
// the logs in the Edgio developer console.
edgioSourceMaps: true,

// Set the following to `true` to disable the Edgio dev tools.
disableEdgioDevTools: false,
// Set the following to `true` to disable the Edgio dev tools.
disableEdgioDevTools: false,

...nextConfig,
}),
);
...nextConfig,
});

const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
"timeago.js": "^4.0.2"
},
"devDependencies": {
"@edgio/cli": "^6.1.8",
"@edgio/core": "^6.1.8",
"@edgio/devtools": "^6.1.8",
"@edgio/next": "^6.1.8",
"@edgio/prefetch": "^6.1.8",
"@edgio/react": "^6.1.8",
"@edgio/cli": "^7.2.5",
"@edgio/core": "^7.2.5",
"@edgio/devtools": "^7.2.5",
"@edgio/next": "^7.2.5",
"@edgio/prefetch": "^7.2.5",
"@edgio/react": "^7.2.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/node": "16.11.7",
Expand Down
6 changes: 3 additions & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ export default function App(props: AppProps & { colorScheme: ColorScheme }) {
</Head>
<Script
id="rum-lib"
src="https://rum.layer0.co/latest.js"
src="https://rum.edgio.net/latest.js"
onLoad={() => {
// @ts-ignore
new Layer0.Metrics({
token: "43cf5623-832d-4e95-aae9-8c2a9368680c",
new Edgio.Metrics({
token: "63a45f52-3972-4ed0-8867-4e762860a563",
}).collect();
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default new Router()
},
},
({ send }) => {
send("User-agent: *\nDisallow: /");
send("User-agent: *\nDisallow: /", 200);
},
)
// Homepage caching
Expand Down
Loading