Skip to content

Commit 8b21868

Browse files
feat: add GitHub Pages deployment workflow
1 parent e34d01e commit 8b21868

2 files changed

Lines changed: 33 additions & 27 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,45 @@ on:
44
push:
55
branches:
66
- main
7-
# Review gh actions docs if you want to further define triggers, paths, etc
8-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
916

1017
jobs:
11-
deploy:
12-
name: Deploy to GitHub Pages
18+
build:
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
1724
with:
18-
node-version: 22
25+
node-version: 20
1926
cache: npm
2027

2128
- name: Install dependencies
2229
run: npm ci
30+
2331
- name: Build website
2432
run: npm run build
2533

26-
- name: Create CNAME file
27-
run: echo 'vstrike.brobridge.com' > ./build/CNAME
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: build
2838

29-
# Popular action to deploy to GitHub Pages:
30-
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
3146
- name: Deploy to GitHub Pages
32-
uses: peaceiris/actions-gh-pages@v3
33-
with:
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
# Build output to publish to the `gh-pages` branch:
36-
publish_dir: ./build
37-
# The following lines assign commit authorship to the official
38-
# GH-Actions bot for deploys to `gh-pages` branch:
39-
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
40-
# The GH actions bot is used by default if you didn't specify the two fields.
41-
# You can swap them out with your own user credentials.
42-
user_name: github-actions[bot]
43-
user_email: 41898282+github-actions[bot]@users.noreply.github.com
47+
id: deployment
48+
uses: actions/deploy-pages@v4

docusaurus.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ const config = {
55
title: 'Brobridge vstrike',
66
tagline: 'The Cloud Native Data Mesh Solution',
77
favicon: 'img/favicon.ico',
8-
url: 'https://your-docusaurus-site.example.com',
9-
baseUrl: '/',
10-
organizationName: 'BBG',
11-
projectName: 'vstrike-documentation',
8+
url: 'https://brobridgeorg.github.io',
9+
baseUrl: '/vstrike.github.io/',
10+
organizationName: 'BrobridgeOrg',
11+
projectName: 'vstrike.github.io',
12+
trailingSlash: false,
1213
onBrokenLinks: 'warn',
1314
onBrokenMarkdownLinks: 'warn',
1415
i18n: {

0 commit comments

Comments
 (0)