Skip to content

Commit

Permalink
feat: build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Mar 21, 2024
1 parent 9643cbb commit c33f6c9
Show file tree
Hide file tree
Showing 6 changed files with 731 additions and 443 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: release
on:
release:
types:
- created

# 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 one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build_and_deploy_pages:
runs-on: ubuntu-latest
environment:
name: "github-pages"
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

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

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
env:
CI: true

- name: Tests
run: pnpm test
env:
CI: true

- name: Build project
run: pnpm build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: "dist"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf dist && ts-node-esm scripts/build.ts"
"build": "rm -rf dist && tsx scripts/build.ts"
},
"keywords": [],
"author": "Luciano Mammino",
"license": "MIT",
"homepage": "https://github.com/FullStackBulletin/fullstack-books#readme",
"devDependencies": {
"@biomejs/biome": "1.6.1",
"@types/markdown-it": "^13.0.7",
"@types/node": "^20.11.28",
"@types/turndown": "^5.0.4",
"cheerio": "1.0.0-rc.12",
"markdown-it": "^14.1.0",
"marked": "^12.0.1",
"mkdirp": "^3.0.1",
"slugify": "^1.6.6",
"tsx": "^4.7.1",
"turndown": "^7.1.3",
"yaml": "^2.4.1"
}
Expand Down
Loading

0 comments on commit c33f6c9

Please sign in to comment.