Skip to content

Commit 21bbbde

Browse files
Update dev.ps1 to load .env variables, switch to npm run build, and integrate act for workflow testing
1 parent 1fc0c5c commit 21bbbde

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

dev.ps1

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,19 @@ $env:GITHUB_RUN_ID = 123
22
$env:GITHUB_EVENT_NAME = "push"
33
$env:GITHUB_EVENT_PATH = "TheDragonCode/preview-updater"
44

5-
npm run dev
5+
$envFile = ".env"
6+
7+
Get-Content $envFile |
8+
ForEach-Object {
9+
if ($_ -match '^(?<key>[^=]+)=(?<val>.*)$')
10+
{
11+
$key = $Matches['key'].Trim()
12+
$val = $Matches['val'].Trim()
13+
14+
$env: $key = $val
15+
}
16+
}
17+
18+
npm run build
19+
20+
act push -W '.github/workflows/preview.yml'

0 commit comments

Comments
 (0)