Skip to content

Commit cb86b1e

Browse files
committed
implementing github action page deploy
1 parent 2352092 commit cb86b1e

File tree

3 files changed

+55
-4
lines changed

3 files changed

+55
-4
lines changed

.github/workflows/docs-deploy.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
# currently for testing
9+
- feature/new-docs
10+
11+
defaults:
12+
run:
13+
shell: bash
14+
working-directory: ./docs
15+
16+
jobs:
17+
build:
18+
name: Build Docusaurus
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: oven-sh/setup-bun@v2
25+
26+
- name: Install dependencies
27+
run: bun ci
28+
- name: Build website
29+
run: bun run build
30+
31+
- name: Upload Build Artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: docs/build
35+
36+
deploy:
37+
name: Deploy to GitHub Pages
38+
needs: build
39+
40+
permissions:
41+
pages: write # to deploy to Pages
42+
id-token: write # to verify the deployment originates from an appropriate source
43+
44+
# Deploy to the github-pages environment
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

docs/docusaurus.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config: Config = {
1515
},
1616

1717
// Set the production url of your site here
18-
url: "https://your-docusaurus-site.example.com",
18+
url: "https://docs.lost.training",
1919
// Set the /<baseUrl>/ pathname under which your site is served
2020
// For GitHub pages deployment, it is often '/<projectName>/'
2121
baseUrl: "/",
@@ -25,6 +25,7 @@ const config: Config = {
2525
organizationName: "L3bm GmbH", // Usually your GitHub org/user name.
2626
projectName: "l3p-cv/lost", // Usually your repo name.
2727

28+
trailingSlash: false,
2829
onBrokenLinks: "throw",
2930
onBrokenMarkdownLinks: "warn",
3031

docs/src/pages/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ export default function Home(): ReactNode {
3636
>
3737
<HomepageHeader />
3838
<main>
39-
<h2>@TODO Include Web page here?</h2>
40-
<br />
41-
<img src="img/LOSTFeaturesIn40seconds.gif" alt="LOST features" />
4239
<HomepageFeatures />
4340
</main>
4441
</Layout>

0 commit comments

Comments
 (0)