Skip to content

Commit

Permalink
feat: frontend github pages (#85)
Browse files Browse the repository at this point in the history
* feat(frontend): static export

* feat: github pages ci (probably)
  • Loading branch information
GabenGar authored Nov 21, 2024
1 parent 9cf2a0d commit bdd07f5
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 8 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Install dependencies
run: npm ci

- name: Build pages
run: npm run build-frontend

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./apps/frontend/dist

# Single deploy job since we're just deploying
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
1 change: 1 addition & 0 deletions apps/frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.next
dist
public
4 changes: 4 additions & 0 deletions apps/frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
trailingSlash: true,
skipTrailingSlashRedirect: true,
distDir: 'dist',
experimental: {
typedRoutes: true,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/form/input/input.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { forwardRef, type Ref } from "react";
import { createBlockComponent } from "@repo/ui/meta";
import type { IRequiredSome } from "@repo/ui/types";
import type { IBaseComponentProps } from "#components/types";
import type { IRequiredSome } from "#types";

import styles from "./input.module.scss";

Expand Down
7 changes: 0 additions & 7 deletions apps/frontend/src/types.ts

This file was deleted.

0 comments on commit bdd07f5

Please sign in to comment.