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 d41a975
Show file tree
Hide file tree
Showing 5 changed files with 17,902 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ 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
shell: pwsh
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*
26 changes: 26 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function LogCommand($command) {
Write-Host "> $($command | Out-String)"
& $command
}

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

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

New-Item -ItemType Directory -Path "./build" | Out-Null

Write-Host "Copy react site to build folder"
Copy-Item -Path "./new-app/build" -Destination "./build/new-app" -Recurse -Force | Out-Null

Write-Host "Copy static site to build folder"
Copy-Item -Path "./breeding" -Destination "./build/breeding" -Recurse -Force | Out-Null
}
finally {
Pop-Location
}
Loading

0 comments on commit d41a975

Please sign in to comment.