Skip to content

Commit

Permalink
actually get started on the website
Browse files Browse the repository at this point in the history
  • Loading branch information
KTrain5169 committed Feb 1, 2025
1 parent 655201f commit e4d8555
Show file tree
Hide file tree
Showing 16 changed files with 2,312 additions and 968 deletions.
Empty file added .github/dependabot.yml
Empty file.
98 changes: 98 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
## Worked on during a community livestream!
## Go watch it @ twitch.tv/trhrichard if it's still live!

name: Lint & check commits

run-name: Run checks on ${{ github.sha }}

on:
push:
branches:
- main
pull_request:

jobs:
astro-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: "pnpm"
cache-dependency-path: "./pnpm-lock.yaml"

- name: Caching
uses: actions/cache@v4
with:
path: |
.astro/
node_modules/
key: astro-check-cache
restore-keys: |
lint-check-cache
deploy-cache
- name: Install dependencies
run: pnpm install --frozen-lockfile # --frozen-lockfile because I want to have anything done reproducible on my side as much as possible

- name: Run Astro checks
run: pnpm astro check

prettier-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: "pnpm"
cache-dependency-path: "./pnpm-lock.yaml"

- name: Caching
uses: actions/cache@v4
with:
path: |
.astro/
node_modules/
key: lint-check-cache
restore-keys: |
astro-check-cache
deploy-cache
- name: Install dependencies
run: pnpm install --frozen-lockfile # --frozen-lockfile because I want to have anything done reproducible on my side as much as possible

- name: Run Prettier checks
id: prettier-check
run: pnpm exec prettier --check .

- name: Correct linting on pushes # I haven't figured this out btw
id: prettier-write
if: ${{ steps.prettier-check.outcome == failure() }}
run: pnpm exec prettier --write .

- name: Push correct linting # I have no idea if it works btw
if: ${{ steps.prettier-write.outcome == success() && github.event_name == 'push' }}
run: |
git config user.name GitHub Actions CI
git config user.email actions@github.com
git add .
git commit -m "[skip ci] Auto-format with Prettier"
git push origin
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## Worked on during a community livestream!
## Go watch it @ twitch.tv/trhrichard if it's still live!

name: Build & deploy to GitHub Pages

run-name: Deploy ${{ github.sha }} to GitHub Pages

on:
push:
branches:
- main
workflow_dispatch:

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: "pnpm"
cache-dependency-path: "./pnpm-lock.yaml"

- name: Caching
uses: actions/cache@v4
with:
path: |
.astro/
node_modules/
dist/
key: deploy-cache
restore-keys: |
*-check-cache
- name: Install dependencies
run: pnpm install --frozen-lockfile # --frozen-lockfile because I want to have anything done reproducible on my side as much as possible

- name: Build site
run: pnpm build

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/

deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package.json
pnpm-lock.yaml
package-lock.json
yarn.lock
.github/dependabot.yml
12 changes: 9 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from "astro/config";

import vue from "@astrojs/vue";

import tailwindcss from "@tailwindcss/vite";

// https://astro.build/config
export default defineConfig({
integrations: [vue()]
});
integrations: [vue()],

vite: {
plugins: [tailwindcss()],
},
});
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "",
"name": "ktools2202-website",
"type": "module",
"version": "0.0.1",
"scripts": {
Expand All @@ -10,10 +10,15 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.1",
"@astrojs/vue": "^4.5.0",
"astro": "^4.13.1",
"@astrojs/check": "^0.9.4",
"@astrojs/vue": "^5.0.6",
"@tailwindcss/vite": "^4.0.2",
"astro": "^5.2.3",
"tailwindcss": "^4.0.2",
"typescript": "^5.5.4",
"vue": "^3.4.35"
},
"devDependencies": {
"prettier": "^3.4.2"
}
}
Loading

0 comments on commit e4d8555

Please sign in to comment.