Skip to content

Commit c33f6c9

Browse files
committed
feat: build and publish
1 parent 9643cbb commit c33f6c9

File tree

6 files changed

+731
-443
lines changed

6 files changed

+731
-443
lines changed

.github/workflows/release.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: release
2+
on:
3+
release:
4+
types:
5+
- created
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow one concurrent deployment
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
build_and_deploy_pages:
23+
runs-on: ubuntu-latest
24+
environment:
25+
name: "github-pages"
26+
url: ${{ steps.deployment.outputs.page_url }}
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
35+
- uses: pnpm/action-setup@v3
36+
with:
37+
version: 8
38+
39+
- name: Use Node 20
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 20.x
43+
cache: 'pnpm'
44+
45+
- name: Install dependencies
46+
run: pnpm install
47+
env:
48+
CI: true
49+
50+
- name: Tests
51+
run: pnpm test
52+
env:
53+
CI: true
54+
55+
- name: Build project
56+
run: pnpm build
57+
58+
- name: Upload artifact
59+
uses: actions/upload-pages-artifact@v1
60+
with:
61+
# Upload entire repository
62+
path: "dist"
63+
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v1

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
"type": "module",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
9-
"build": "rm -rf dist && ts-node-esm scripts/build.ts"
9+
"build": "rm -rf dist && tsx scripts/build.ts"
1010
},
1111
"keywords": [],
1212
"author": "Luciano Mammino",
1313
"license": "MIT",
1414
"homepage": "https://github.com/FullStackBulletin/fullstack-books#readme",
1515
"devDependencies": {
1616
"@biomejs/biome": "1.6.1",
17-
"@types/markdown-it": "^13.0.7",
1817
"@types/node": "^20.11.28",
1918
"@types/turndown": "^5.0.4",
2019
"cheerio": "1.0.0-rc.12",
21-
"markdown-it": "^14.1.0",
20+
"marked": "^12.0.1",
2221
"mkdirp": "^3.0.1",
2322
"slugify": "^1.6.6",
23+
"tsx": "^4.7.1",
2424
"turndown": "^7.1.3",
2525
"yaml": "^2.4.1"
2626
}

0 commit comments

Comments
 (0)