Skip to content

Commit 9020bd1

Browse files
committed
feat: add github pages deploy yml file
1 parent 0651d4f commit 9020bd1

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.github/workflows/gh-pages.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout 🛎️
16+
uses: actions/checkout@v4
17+
18+
- name: Install and Build 🔧
19+
run: |
20+
npm install
21+
npm run build
22+
23+
- name: Deploy 🚀
24+
uses: JamesIves/github-pages-deploy-action@v4
25+
with:
26+
# The folder the action should deploy.
27+
folder: docs/.vitepress/dist

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
22
"name": "ago",
3-
"main": "index.js",
3+
"main": "docs/.vitepress/index.js",
44
"repository": "https://github.com/php-ago/php-ago.github.io",
55
"author": "SerhiiCho <[email protected]>",
66
"license": "MIT",
77
"scripts": {
88
"dev": "vitepress dev docs --host",
99
"build": "vitepress build docs",
10-
"preview": "yarn build && vitepress preview docs",
11-
"deploy": "yarn build && gh-pages -d docs/.vitepress/dist"
10+
"preview": "yarn build && vitepress preview docs"
1211
},
1312
"devDependencies": {
14-
"gh-pages": "^6.2.0",
1513
"vitepress": "^1.6.3",
1614
"vitepress-versioning-plugin": "1.3.0"
1715
},

0 commit comments

Comments
 (0)