Skip to content

Commit afb5d8c

Browse files
committed
chore(docs): add action for deploying docs
1 parent 0058830 commit afb5d8c

File tree

3 files changed

+2660
-2110
lines changed

3 files changed

+2660
-2110
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Based on https://docs.astro.build/en/guides/deploy/github/
2+
name: Deploy docs to GitHub Pages
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
# Allows you to run this workflow manually from the Actions tab on GitHub.
8+
workflow_dispatch:
9+
10+
# Allow this job to clone the repo and create a page deployment
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout your repository using git
21+
uses: actions/checkout@v4
22+
- name: Install, build, and upload your site
23+
uses: withastro/action@v2
24+
with:
25+
path: docs # The root location of your Astro project inside the repository.
26+
package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile.
27+
28+
deploy:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

docs/astro.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import { defineConfig } from 'astro/config';
22
import starlight from '@astrojs/starlight';
33
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers';
44

5-
const site = 'https://starter.obytes.com/';
5+
const site = 'https://rootstrap.github.io';
6+
const base = 'react-native-template';
67

78
// https://astro.build/config
89
export default defineConfig({
10+
site,
11+
base,
912
integrations: [
1013
starlight({
1114
title: 'Obytes Starter | React Native Template',

0 commit comments

Comments
 (0)