fix: Made github token optional
Some checks failed
Build Gameflow Site / build (push) Failing after 1m5s
Some checks failed
Build Gameflow Site / build (push) Failing after 1m5s
This commit is contained in:
parent
e8395a832e
commit
cb0ef9207d
4 changed files with 15 additions and 23 deletions
|
|
@ -29,7 +29,7 @@ jobs:
|
||||||
uses: https://github.com/withastro/action@main
|
uses: https://github.com/withastro/action@main
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
|
||||||
SITE_BASE:
|
SITE_BASE: /
|
||||||
SITE_URL: https://gameflow.simeonradivoev.com
|
SITE_URL: https://gameflow.simeonradivoev.com
|
||||||
with:
|
with:
|
||||||
package-manager: "bun"
|
package-manager: "bun"
|
||||||
|
|
|
||||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
uses: withastro/action@v4
|
uses: withastro/action@v4
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SITE_BASE: gameflow-website
|
SITE_BASE: /gameflow-website
|
||||||
SITE_URL: https://simeonradivoev.github.io
|
SITE_URL: https://simeonradivoev.github.io
|
||||||
with:
|
with:
|
||||||
package-manager: "bun"
|
package-manager: "bun"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const env = loadEnv(process.env.NODE_ENV, process.cwd(), '');
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: env.SITE_URL,
|
site: env.SITE_URL,
|
||||||
base: `/${env.SITE_BASE}`,
|
base: env.SITE_BASE,
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
tailwindcss()
|
tailwindcss()
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,29 @@
|
||||||
export const repoData = await fetch(
|
const githubHeaders = import.meta.env.GITHUB_TOKEN
|
||||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck",
|
? {
|
||||||
{
|
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
|
: {};
|
||||||
|
|
||||||
|
export const repoData = await fetch(
|
||||||
|
"https://api.github.com/repos/simeonradivoev/gameflow-deck",
|
||||||
|
githubHeaders,
|
||||||
).then((res) => res.json());
|
).then((res) => res.json());
|
||||||
|
|
||||||
export const releaseData = await fetch(
|
export const releaseData = await fetch(
|
||||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck/releases/latest",
|
"https://api.github.com/repos/simeonradivoev/gameflow-deck/releases/latest",
|
||||||
{
|
githubHeaders,
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
).then((res) => res.json());
|
).then((res) => res.json());
|
||||||
|
|
||||||
export const appContributorsData = await fetch(
|
export const appContributorsData = await fetch(
|
||||||
"https://api.github.com/repos/simeonradivoev/gameflow-deck/contributors",
|
"https://api.github.com/repos/simeonradivoev/gameflow-deck/contributors",
|
||||||
{
|
githubHeaders,
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
).then((res) => res.json());
|
).then((res) => res.json());
|
||||||
|
|
||||||
export const storeContributorsData = await fetch(
|
export const storeContributorsData = await fetch(
|
||||||
"https://api.github.com/repos/simeonradivoev/gameflow-store/contributors",
|
"https://api.github.com/repos/simeonradivoev/gameflow-store/contributors",
|
||||||
{
|
githubHeaders,
|
||||||
headers: {
|
|
||||||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
).then((res) => res.json());
|
).then((res) => res.json());
|
||||||
|
|
||||||
export const emulators = await fetch(
|
export const emulators = await fetch(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue