Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved build and deployment configuration #26

Merged
merged 7 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .do/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ingress:
name: lineup
match:
path:
prefix: /lineup
prefix: /
name: lineup-app
region: nyc
static_sites:
Expand All @@ -23,6 +23,9 @@ static_sites:
- key: NITRO_PRESET
scope: BUILD_TIME
value: digital-ocean
- key: NUXT_APP_BASE_URL
scope: BUILD_TIME
value: '/'
error_document: 404.html
github:
branch: main
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nuxtjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ jobs:
- name: Static HTML export with Nuxt
run: |
${{ steps.detect-package-manager.outputs.manager }} run generate
# this should be taken care of by Nitro with NITRO_PRESET
# this should be taken care of by Nitro with NITRO_PRESET=github_pages
#touch ./.output/.nojekyll
env:
NITRO_PRESET: github_pages
NUXT_APP_BASE_URL: '/lineup/'
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ For a preview of the generated site on http://localhost:3000/, you can run:
npm run preview
```

Note that the preview feature may not work. A workaround is documented [here](https://github.com/nuxt/nuxt/issues/14454#issuecomment-1397357957) but it doesn't seem to help.

### Publish Firestore Indexes and Security Rules

If the Firestore indexes or security rules have changed, they will need to be pushed during deployment of the app.
Expand Down
2 changes: 1 addition & 1 deletion components/scoreboard/ScoreboardEmojiButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const emojiTitle = computed(() => emojiTitles[props.id]);
<template>
<button type="button" @click="emit('emote', props.id)" class="mb-2">
<img
:src="`/lineup/images/fluentui-emoji/${props.id}_color.svg`"
:src="`/images/fluentui-emoji/${props.id}_color.svg`"
:alt="emojiTitle"
:title="emojiTitle"
/>
Expand Down
14 changes: 5 additions & 9 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
// some people report having issues with devtools;
// uncomment to enable
// some people report having issues with devtools
//devtools: { enabled: true },
modules: [
"@nuxtjs/color-mode",
Expand All @@ -10,19 +9,16 @@ export default defineNuxtConfig({
"@vueuse/nuxt",
"nuxt-vuefire"
],
// this allows us to deploy to free static hosting services
ssr: false,
// disable splash screen
spaLoadingTemplate: false,
css: [
'primevue/resources/themes/saga-blue/theme.css',
'primevue/resources/primevue.css',
'primeicons/primeicons.css',
'~/assets/css/common.css',
],
app: {
// required for GitHub deployment
baseURL: '/lineup/',
// overriden by NUXT_APP_BASE_URL envvar
// see https://nuxt.com/docs/api/composables/use-runtime-config#appbaseurl
//baseURL: '/',
head: {
htmlAttrs: {
lang: 'en'
Expand All @@ -32,7 +28,7 @@ export default defineNuxtConfig({
{
rel: 'icon',
type: 'image/x-icon',
href: '/lineup/favicon/favicon.ico'
href: '/favicon/favicon.ico'
}
]
}
Expand Down
Loading