Added Pipeline for deploying to github actions (#1)

* added deployment for frontent github pages

* whitelisted feature branch for now

* added 404.vue page and adjusted config

* building now with github pages preset

* set fallback option to true

* set target option

* removing env for now

* added root page

* added deploy

* adjusted workflow

* removed options
This commit is contained in:
2025-05-06 19:52:13 +02:00
committed by GitHub
parent 7886af58e4
commit 59310c5453
4 changed files with 75 additions and 4 deletions

44
.github/workflows/pages.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
- feature/github-pages
jobs:
build:
runs-on: ubuntu-latest
container:
image: oven/bun:1 # Use Bun's official Docker image
steps:
- uses: actions/checkout@v4
- name: Install dependencies with Bun
working-directory: ./web
run: bun install
- name: Build with Nuxt
working-directory: ./web
run: bunx nuxt build --preset github_pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./web/.output/public
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github_pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@@ -2,5 +2,8 @@
export default defineNuxtConfig({ export default defineNuxtConfig({
compatibilityDate: '2024-11-01', compatibilityDate: '2024-11-01',
devtools: { enabled: true }, devtools: { enabled: true },
modules: ['@nuxt/eslint', '@nuxt/test-utils', '@nuxt/ui'] modules: ['@nuxt/eslint', '@nuxt/test-utils', '@nuxt/ui'],
app: {
baseURL: process.env.BASE_URL,
},
}) })

12
web/pages/404.vue Normal file
View File

@@ -0,0 +1,12 @@
<script setup lang="ts">
</script>
<template>
<div>
404 not found
</div>
</template>
<style scoped></style>

12
web/pages/index.vue Normal file
View File

@@ -0,0 +1,12 @@
<script setup lang="ts">
</script>
<template>
<div>
indx
</div>
</template>
<style scoped></style>