diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fe7e541 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,51 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 49f92b6..6954ff7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@
-GHBanner +GHBanner
# Run and deploy your AI Studio app This contains everything you need to run your app locally. -https://ai.studio/apps/cb46be2f-ccc9-4306-a691-830141498fbb + +View your app in AI Studio: https://ai.studio/apps/cb46be2f-ccc9-4306-a691-830141498fbb ## Run Locally @@ -16,4 +17,4 @@ https://ai.studio/apps/cb46be2f-ccc9-4306-a691-830141498fbb `npm install` 2. Set the `GEMINI_API_KEY` in [.env.local](.env.local) to your Gemini API key 3. Run the app: - `npm run dev` \ No newline at end of file + `npm run dev` diff --git a/metadata.json b/metadata.json index 6e2e148..4b5c97e 100644 --- a/metadata.json +++ b/metadata.json @@ -1 +1,6 @@ -{"name":"Til Mika","description":"Et romantisk, interaktivt polaroid-galleri med svevende minner.","requestFramePermissions":[],"majorCapabilities":["MAJOR_CAPABILITY_SERVER_SIDE_GEMINI_API"]} \ No newline at end of file +{ + "name": "Til Mika", + "description": "Et romantisk, interaktivt polaroid-galleri med svevende minner.", + "requestFramePermissions": [], + "majorCapabilities": ["MAJOR_CAPABILITY_SERVER_SIDE_GEMINI_API"] +} diff --git a/vite.config.ts b/vite.config.ts index fc23e76..77380b6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,7 @@ import {defineConfig} from 'vite'; export default defineConfig(() => { return { + base: '/Til-Mika/', plugins: [react(), tailwindcss()], resolve: { alias: {