Skip to content

Commit 3ed8b9e

Browse files
committed
fix: various scripts and github actions
1 parent ab34fce commit 3ed8b9e

File tree

6 files changed

+8
-16
lines changed

6 files changed

+8
-16
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GITHUB_TOKEN="" # GitHub token
1+
GH_TOKEN="" # GitHub token
22

33
NUXT_PUBLIC_SITE_URL="https://projectm-visualizer.org" # Public URL, used for OG Image when running nuxt generate
44
NUXT_PUBLIC_ASSET_KEY="" # Asset encryption key for the public assets

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@ jobs:
4646
- name: Build
4747
run: bun run generate
4848
env:
49-
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
5049
NUXT_PUBLIC_SITE_URL: ${{ secrets.NUXT_PUBLIC_SITE_URL }}
5150
NUXT_PUBLIC_ASSET_KEY: ${{ secrets.NUXT_PUBLIC_ASSET_KEY }}

.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 --force
51-
env:
52-
REMOTE_CONNECTION: ${{ secrets.REMOTE_CONNECTION }}
53-
5449
- name: Build
5550
run: bun run generate
5651
env:

.nuxtignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
public/assets/data
2-
public/assets/images/avatars

scripts/generate-reports.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Bun from 'bun'
1616
const OWNER = 'projectm-visualizer'
1717
const OUTPUT_DATA_DIR = 'public/assets/data'
1818
const OUTPUT_AVATAR_DIR = 'public/assets/images/avatars'
19-
const GITHUB_TOKEN = process.env.GITHUB_TOKEN
19+
const GH_TOKEN = process.env.GH_TOKEN
2020
const ENCRYPTION_KEY = process.env.NUXT_PUBLIC_ASSET_KEY
2121

2222
// ---------- Arg Parser ----------
@@ -35,15 +35,15 @@ function parseArgs() {
3535
const outputDataDir = getArgValue(args, '--outputData', '-d', OUTPUT_DATA_DIR)
3636
const outputAvatarDir = getArgValue(args, '--outputAvatars', '-a', OUTPUT_AVATAR_DIR)
3737
const owner = getArgValue(args, '--owner', '-n', OWNER)
38-
const token = getArgValue(args, '--token', '-t', GITHUB_TOKEN)
38+
const token = getArgValue(args, '--token', '-t', GH_TOKEN)
3939

4040
if (!encryptionKey && encrypt) {
4141
console.error('❌ Missing encryption key. Use --encryptionKey or -k to provide it or set NUXT_PUBLIC_ASSET_KEY environment variable.')
4242
process.exit(1)
4343
}
4444

4545
if (!token) {
46-
console.error('❌ Missing GitHub token. Use --token or -t to provide it or set GITHUB_TOKEN environment variable.')
46+
console.error('❌ Missing GitHub token. Use --token or -t to provide it or set GH_TOKEN environment variable.')
4747
process.exit(1)
4848
}
4949

scripts/push-secrets.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import _sodium from 'libsodium-wrappers'
1515
// ---------- Config & Constants ----------
1616

1717
const ENV_FILE = '.env'
18-
const ENV_KEYS = 'GH_TOKEN,NUXT_UI_PRO_LICENSE,NUXT_PUBLIC_SITE_URL,NUXT_PUBLIC_ASSET_KEY,REMOTE_CONNECTION'
18+
const ENV_KEYS = 'GH_TOKEN,NUXT_PUBLIC_SITE_URL,NUXT_PUBLIC_ASSET_KEY,REMOTE_CONNECTION'
1919

2020
const OWNER = 'projectm-visualizer'
2121
const REPOSITORY = 'projectm-visualizer.org'
22-
const GITHUB_TOKEN = process.env.GITHUB_TOKEN
22+
const GH_TOKEN = process.env.GH_TOKEN
2323

2424
// ---------- Arg Parser ----------
2525

@@ -37,10 +37,10 @@ function parseArgs() {
3737
const keyNames = getArgValue(args, '--keyNames', '-k', ENV_KEYS)?.split(',').map(key => key.trim()) || []
3838
const owner = getArgValue(args, '--owner', '-o', OWNER)
3939
const repo = getArgValue(args, '--repo', '-r', REPOSITORY)
40-
const token = getArgValue(args, '--token', '-t', GITHUB_TOKEN)
40+
const token = getArgValue(args, '--token', '-t', GH_TOKEN)
4141

4242
if (!token) {
43-
console.error('❌ Missing GitHub token. Use --token or -t to provide it or set GITHUB_TOKEN environment variable.')
43+
console.error('❌ Missing GitHub token. Use --token or -t to provide it or set GH_TOKEN environment variable.')
4444
process.exit(1)
4545
}
4646

0 commit comments

Comments
 (0)