Skip to content

Commit

Permalink
fix: pull changelog and blog data from correct repo (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonpole committed Nov 30, 2024
1 parent 5f4a5e4 commit d084fa5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_GITHUB_TOKEN=
VITE_DISCORD_INVITE_CODE=
VITE_APPLICATION_REPO_URL=
20 changes: 7 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Production

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -19,22 +18,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- run: npm ci
- run: npm run build
env:
VITE_GITHUB_TOKEN: ${{ secrets.VITE_GITHUB_TOKEN }}
VITE_DISCORD_INVITE_CODE: ${{ vars.VITE_DISCORD_INVITE_CODE }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
VITE_APPLICATION_REPO_URL: ${{ vars.VITE_APPLICATION_REPO_URL }}
- uses: actions/upload-pages-artifact@v3
with:
path: "./dist"
deploy:
Expand All @@ -44,8 +39,7 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v4
- uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 1 addition & 2 deletions src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
* @module
*/
import AppInfo from "package.json";
import { graphql } from "@liga/generated";
import { RepositoryQuery } from "@liga/generated/graphql";
import {
Expand Down Expand Up @@ -100,7 +99,7 @@ export function getRepoInfo(): {
owner: string;
name: string;
} {
const repoInfo = AppInfo.repository.url.match(
const repoInfo = import.meta.env.VITE_APPLICATION_REPO_URL.match(
/(?<protocol>.+):\/\/(?<domain>.+)\/(?<owner>\w+)\/(?<name>.+)\.git/,
);

Expand Down
1 change: 1 addition & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
interface ImportMetaEnv {
readonly VITE_GITHUB_TOKEN: string;
readonly VITE_DISCORD_INVITE_CODE: string;
readonly VITE_APPLICATION_REPO_URL: string;
}

0 comments on commit d084fa5

Please sign in to comment.