Skip to content

Commit 6040764

Browse files
authored
build: switch to pnpm and vite-plugin-ssr (#1)
1 parent e1f3c09 commit 6040764

23 files changed

+2875
-8706
lines changed

.github/workflows/ci.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'CI'
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout source code
10+
uses: actions/checkout@v3
11+
12+
- name: Install pnpm
13+
uses: pnpm/action-setup@10693b3829bf86eb2572aef5f3571dcf5ca9287d
14+
with:
15+
version: '7.9.1'
16+
17+
- name: Install Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
cache: pnpm
22+
23+
- name: Install development dependencies
24+
run: pnpm install --frozen-lockfile
25+
26+
- name: Check source and build / test assets
27+
run: pnpm all
28+
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v1
31+
with:
32+
path: dist/client
33+
34+
deploy:
35+
if: ${{ github.ref == 'refs/heads/main' }}
36+
runs-on: ubuntu-latest
37+
needs: build
38+
39+
permissions:
40+
pages: write
41+
id-token: write
42+
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v1

.github/workflows/ci.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules
22
dist
3-
dist-ssr

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pnpm-lock.yaml
2+
package.json
3+
dist

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
# mike.cousins.io
22

3-
> Mike Cousins' home on the internet
3+
Michael Cousins' home on the internet
44

55
<https://mike.cousins.io>
66

77
## Develop
88

9+
Node.js v16 recommended for development.
10+
911
```shell
1012
# start the dev server
11-
npm run dev
13+
pnpm dev
1214

1315
# format, lint, and typecheck
14-
npm run format
15-
npm run lint
16-
npm run check
16+
pnpm format
17+
pnpm lint
18+
pnpm types
1719

1820
# build and serve production assets
19-
npm run build
20-
npm run preview
21+
pnpm build
22+
pnpm preview
2123
```
2224

2325
## Deploy
2426

25-
Cut a new version and push to GitHub to tell the CI server to build and deploy HTML and CSS to GitHub pages:
26-
27-
```shell
28-
npm version ${level} -m 'chore(release): %s'
29-
git push --follow-tags
30-
```
27+
The site is continuously deployed to GitHub Pages from `main`.

index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)