Skip to content
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: 0 additions & 5 deletions .astro/settings.json

This file was deleted.

1 change: 0 additions & 1 deletion .astro/types.d.ts

This file was deleted.

19 changes: 16 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,34 @@ on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
uses: actions/checkout@v7.0.1

- name: Set up Node.js
uses: actions/setup-node@v7.0.0
with:
node-version-file: .nvmrc
cache: npm

- name: Install and Build
run: |
npm install
npm ci
npm run build

- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.9.0
with:
branch: gh-pages
folder: dist
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ yarn-error.log*

# macOS-specific files
.DS_Store

# generated Astro files
.astro/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
24
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

https://muncompsci.ca/

This website is build using [Astro](https://astro.build).
This website is built using [Astro](https://astro.build).

Use Node.js 24 (`nvm install && nvm use`) before installing dependencies. CI uses the same version from `.nvmrc`.

## Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
|:----------------|:--------------------------------------------|
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| Command | Action |
| :---------------- | :------------------------------------------ |
| `npm ci` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview the production build locally |

Pull requests run a clean install and production build. Pushes to `main` also deploy to the existing `gh-pages` branch.

## Structure

Expand Down
8 changes: 5 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { defineConfig } from "astro/config";
import react from "@astrojs/react";
import tailwind from "@astrojs/tailwind";
import tailwind from "@tailwindcss/vite";

// https://astro.build/config
export default defineConfig({
site: "https://muncompsci.ca",
sitemap: true,
integrations: [react(), tailwind({ config: { applyBaseStyles: false } })],
// Preserve spacing between inline elements from the existing pages.
compressHTML: true,
integrations: [react()],
vite: { plugins: [tailwind()] },
});
Loading