Skip to content

Commit 3e2ef76

Browse files
author
Nam088
committed
Configure GitHub Pages deployment for ecom-co/document repository
1 parent b955911 commit 3e2ef76

2 files changed

Lines changed: 41 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Deploy to GitHub Pages
29+
uses: peaceiris/actions-gh-pages@v3
30+
if: github.ref == 'refs/heads/main'
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./build
34+
cname: ecom-co.github.io

docusaurus.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ const config: Config = {
1919
},
2020

2121
// Set the production url of your site here
22-
url: 'https://example.com',
22+
url: 'https://ecom-co.github.io',
2323
// Set the /<baseUrl>/ pathname under which your site is served
2424
// For GitHub pages deployment, it is often '/<projectName>/'
25-
baseUrl: '/',
25+
baseUrl: '/document/',
2626

2727
// GitHub pages deployment config.
2828
// If you aren't using GitHub pages, you don't need these.
29-
organizationName: 'my-org', // Usually your GitHub org/user name.
30-
projectName: 'my-docs', // Usually your repo name.
29+
organizationName: 'ecom-co', // Usually your GitHub org/user name.
30+
projectName: 'document', // Usually your repo name.
3131

3232
onBrokenLinks: 'throw',
3333
onBrokenMarkdownLinks: 'warn',
@@ -50,7 +50,7 @@ const config: Config = {
5050
// Please change this to your repo.
5151
// Remove this to remove the "edit this page" links.
5252
editUrl:
53-
'https://github.com/my-org/my-docs/tree/main/',
53+
'https://github.com/ecom-co/document/tree/main/',
5454

5555
},
5656
blog: {
@@ -62,7 +62,7 @@ const config: Config = {
6262
// Please change this to your repo.
6363
// Remove this to remove the "edit this page" links.
6464
editUrl:
65-
'https://github.com/my-org/my-docs/tree/main/',
65+
'https://github.com/ecom-co/document/tree/main/',
6666
// Useful options to enforce blogging best practices
6767
onInlineTags: 'warn',
6868
onInlineAuthors: 'warn',
@@ -112,7 +112,7 @@ const config: Config = {
112112
position: 'right',
113113
},
114114
{
115-
href: 'https://github.com/my-org/my-docs',
115+
href: 'https://github.com/ecom-co/document',
116116
label: 'GitHub',
117117
position: 'right',
118118
},

0 commit comments

Comments
 (0)