Skip to content

Commit 38e3d3b

Browse files
committed
fix: improper loading of data files and removed unnecessary release step
1 parent 69b329a commit 38e3d3b

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ jobs:
4646
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4747
NUXT_PUBLIC_ASSET_KEY: ${{ secrets.NUXT_PUBLIC_ASSET_KEY }}
4848

49-
- name: Push assets
50-
run: bun run ftp:assets:push
51-
env:
52-
REMOTE_CONNECTION: ${{ secrets.REMOTE_CONNECTION }}
53-
5449
- name: Build
5550
run: bun run generate
5651
env:

app/app.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ const { data: app } = await useAsyncData('links', () => queryCollection('app').f
3535
3636
provide('navigation', navigation)
3737
38-
const dataStore = useDataStore()
39-
await dataStore.fetchProjects()
40-
await dataStore.fetchContributors()
38+
if (import.meta.client) {
39+
const dataStore = useDataStore()
40+
await dataStore.fetchProjects()
41+
await dataStore.fetchContributors()
42+
}
4143
</script>
4244

4345
<template>

app/stores/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const useDataStore = defineStore('data', {
1818
async fetchProjects(): Promise<Project[]> {
1919
const { assetKey, siteUrl } = useRuntimeConfig().public
2020
const projectsBaseUrl = `${siteUrl}/assets/data/projects`
21-
const url = projectsBaseUrl + (this.encrypted ? '.dat' : '.json')
21+
const url = projectsBaseUrl + (this.encrypted ? '.json.aes' : '.json')
2222

2323
try {
2424
const response = await fetch(url)
@@ -87,7 +87,7 @@ export const useDataStore = defineStore('data', {
8787
async fetchContributors(): Promise<Contributor[]> {
8888
const { assetKey, siteUrl } = useRuntimeConfig().public
8989
const contributorsBaseUrl = `${siteUrl}/assets/data/contributors`
90-
const url = contributorsBaseUrl + (this.encrypted ? '.dat' : '.json')
90+
const url = contributorsBaseUrl + (this.encrypted ? '.json.aes' : '.json')
9191

9292
try {
9393
const response = await fetch(url)

scripts/generate-reports.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ async function main() {
277277
const projectsOutput = encrypt
278278
? await encryptContent(encryptionKey, JSON.stringify(enrichedReleases, null, 2))
279279
: JSON.stringify(enrichedRepos, null, 2)
280-
const projectsFile = encrypt ? `${output}/projects.dat` : `${output}/projects.json`
280+
const projectsFile = encrypt ? `${output}/projects.json.aes` : `${output}/projects.json`
281281
await Bun.write(projectsFile, projectsOutput, { createPath: true })
282282
console.log(`✅ Saved ${enrichedRepos.length} repositories → ${projectsFile}`)
283283

@@ -286,7 +286,7 @@ async function main() {
286286
const contributorsOutput = encrypt
287287
? await encryptContent(encryptionKey, JSON.stringify(contributors, null, 2))
288288
: JSON.stringify(contributors, null, 2)
289-
const contributorsFile = encrypt ? `${output}/contributors.dat` : `${output}/contributors.json`
289+
const contributorsFile = encrypt ? `${output}/contributors.json.aes` : `${output}/contributors.json`
290290
await Bun.write(contributorsFile, contributorsOutput, { createPath: true })
291291
console.log(`✅ Saved ${contributors.length} unique contributors → ${contributorsFile}`)
292292

0 commit comments

Comments
 (0)