Skip to content

Commit

Permalink
ci: setup cd
Browse files Browse the repository at this point in the history
Signed-off-by: andrei-zgirvaci <[email protected]>
  • Loading branch information
andrei-zgirvaci committed Apr 9, 2024
1 parent 4539962 commit c1a6c7b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
49 changes: 47 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Distribute Sample App to App Center
name: Distribute Sample App to App Center & Build Docs

on:
push:
branches: [main, ci]
branches: [main, ci, documentation]

jobs:
build-and-deploy-sample-app:
Expand Down Expand Up @@ -54,3 +54,48 @@ jobs:
notifyTesters: true
debug: true
gitReleaseNotes: true

build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Build docs
run: |
cd docs
bun run build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build

deploy-docs:
needs: build-docs

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const config: Config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
url: 'https://special-barnacle-93vn82m.pages.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"docs",
"packages/*"
],
"dependencies": {
"react-loadable": "npm:@docusaurus/[email protected]"
},
"devDependencies": {
"@commitlint/config-conventional": "^19.1.0",
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
Expand Down

0 comments on commit c1a6c7b

Please sign in to comment.