Skip to content

Commit

Permalink
add new app
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Mar 22, 2024
1 parent ef568e6 commit 1607e96
Show file tree
Hide file tree
Showing 5 changed files with 17,898 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: install dependencies
run: npm ci
- name: build app
run: npm run build
env:
PUBLIC_URL: /game
- name: run build.ps1
run: ./build.ps1
- name: upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
23 changes: 23 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function LogCommand($command) {
Write-Host "> $($command | Out-String)"
& $command
}

Push-Location -Path $PSScriptRoot
try {
npm ci
$ENV:PUBLIC_URL = "/new-app"
npm run build -ws --if-present

if (Test-Path "./build") {
Remove-Item -Recurse -Force build
}

New-Item -ItemType Directory -Path "./build"

Copy-Item -Path "./new-app/build" -Destination "./build/new-app" -Recurse -Force | Out-Null
Copy-Item -Path "./breeding" -Destination "./build/breeding" -Recurse -Force | Out-Null
}
finally {
Pop-Location
}
Loading

0 comments on commit 1607e96

Please sign in to comment.