Skip to content

Commit

Permalink
Use nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr committed Mar 28, 2024
1 parent 88fe419 commit 46bc7ee
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 370 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
node-version: 18.x
- name: run build.ps1
shell: pwsh
run: ./build.ps1
run: ./build.ps1 -CI
- name: upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./out
path: ./dist
- name: deploy to github pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# app
# hallipr.github.io

## Build Setup

Expand Down
21 changes: 7 additions & 14 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
param (
[switch]$Incremental
[switch]$CI
)

function LogCommand($command) {
Expand All @@ -9,22 +9,15 @@ function LogCommand($command) {

Push-Location -Path $PSScriptRoot
try {
if($Incremental) {
LogCommand { npm install }
} else {
if($CI) {
LogCommand { npm ci }
} else {
LogCommand { npm install }
}
LogCommand { npm run build -ws --if-present }

$outFolder = "./out"
if (Test-Path $outFolder) {
Remove-Item -Recurse -Force $outFolder
}

$outFolder = New-Item -ItemType Directory -Path $outFolder

LogCommand { npm run build }

Write-Host "Copy react site to build/new-app folder"
Copy-Item -Path "./new-app/out/*" -Destination "$outFolder" -Recurse -Force | Out-Null
LogCommand { npm run generate }
}
finally {
Pop-Location
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {

// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'app',
title: 'hallipr.github.io',
htmlAttrs: {
lang: 'en',
},
Expand Down
Loading

0 comments on commit 46bc7ee

Please sign in to comment.