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
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI & CD
on:
push:
branches:
- source
jobs:
Build-and-Deploy:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
personal_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true

- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
vercel-args: --prod
35 changes: 35 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Commit preview
on:
push:
branches-ignore:
- source
jobs:
Build-and-Deploy:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build

- uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules/
package-lock.json
yarn.lock
dist/
.cache/
.parcel-cache/
.husky/
.vscode/
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm test
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm run build
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers = false
8 changes: 8 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": [
"@parcel/transformer-typescript-tsc"
]
}
}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

8 changes: 3 additions & 5 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# WebCell official website

Design of https://web-cell.dev/ is based on [Product][1] & [Carousel][2] templates of BootStrap 4.
Design of https://web-cell.dev/ is based on [Product][1] & [Carousel][2] templates of BootStrap 5.

[![NPM Dependency](https://david-dm.org/EasyWebApp/EasyWebApp.github.io.svg)][3]
[![Build Status](https://travis-ci.com/EasyWebApp/EasyWebApp.github.io.svg?branch=source)][4]
[![CI & CD](https://github.com/EasyWebApp/EasyWebApp.github.io/actions/workflows/main.yml/badge.svg)][3]

[1]: https://getbootstrap.com/docs/4.5/examples/product/
[2]: https://getbootstrap.com/docs/4.5/examples/carousel/
[3]: https://david-dm.org/EasyWebApp/EasyWebApp.github.io
[4]: https://travis-ci.com/EasyWebApp/EasyWebApp.github.io
[3]: https://github.com/EasyWebApp/EasyWebApp.github.io/actions/workflows/main.yml
61 changes: 26 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web-cell/home",
"version": "1.0.0",
"version": "2.0.0",
"description": "Official site of WebCell",
"keywords": [
"WebCell",
Expand All @@ -20,28 +20,32 @@
"url": "https://github.com/EasyWebApp/EasyWebApp.github.io/issues"
},
"dependencies": {
"boot-cell": "^1.9.4",
"cell-router": "^2.0.4",
"classnames": "^2.2.6",
"github-web-widget": "^3.0.0-beta.9",
"koajax": "^0.6.4",
"marked": "^1.2.7",
"prismjs": "^1.23.0",
"web-cell": "^2.3.0-rc.1",
"web-utility": "^2.4.3"
"boot-cell": "^2.0.0-beta.7",
"cell-router": "^3.0.0-rc.5",
"classnames": "^2.5.1",
"dom-renderer": "^2.0.6",
"github-web-widget": "^4.0.0-rc.1",
"koajax": "^0.9.6",
"marked": "^11.1.1",
"mobx": "^6.12.0",
"prismjs": "^1.29.0",
"web-cell": "^3.0.0-rc.7",
"web-utility": "^4.1.3"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@types/classnames": "^2.2.11",
"autoprefixer": "^9.8.6",
"husky": "^4.3.7",
"less": "^4.1.0",
"lint-staged": "^10.5.3",
"parcel-bundler": "^1.12.4",
"postcss-modules": "^3.2.2",
"prettier": "^2.2.1",
"typescript": "^4.1.3",
"workbox-cli": "^6.0.2"
"@parcel/config-default": "~2.11.0",
"@parcel/packager-raw-url": "~2.11.0",
"@parcel/transformer-less": "~2.11.0",
"@parcel/transformer-typescript-tsc": "~2.11.0",
"@parcel/transformer-webmanifest": "~2.11.0",
"@types/classnames": "^2.3.1",
"@types/node": "^18.19.8",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"parcel": "~2.11.0",
"prettier": "^3.2.4",
"typescript": "~5.3.3",
"workbox-cli": "^7.0.0"
},
"prettier": {
"tabWidth": 4,
Expand All @@ -52,25 +56,12 @@
"lint-staged": {
"*.{html,md,less,json,yml,js,ts,tsx}": "prettier --write"
},
"postcss": {
"modules": true,
"plugins": {
"autoprefixer": {
"grid": true
}
}
},
"scripts": {
"prepare": "husky install",
"test": "lint-staged",
"start": "parcel source/index.html --open",
"pack-dist": "parcel build source/index.html --public-url .",
"pack-sw": "rm -f dist/sw.js.map && workbox generateSW",
"build": "rm -rf dist/ && npm run pack-dist && npm run pack-sw"
},
"husky": {
"hooks": {
"pre-commit": "npm test",
"pre-push": "npm run build"
}
}
}
Loading