Skip to content

Commit b29e82c

Browse files
committed
Add GitHub Pages deployment
1 parent 4e43f35 commit b29e82c

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.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+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout your repository using git
17+
uses: actions/checkout@v4
18+
- name: Install, build, and upload your site
19+
uses: withastro/action@v3
20+
# with:
21+
# path: . # The root location of your Astro project inside the repository. (optional)
22+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
23+
# 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. (optional)
24+
25+
deploy:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
steps:
32+
- name: Deploy to GitHub Pages
33+
id: deployment
34+
uses: actions/deploy-pages@v4

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const guideChapters = [
1414

1515
// https://astro.build/config
1616
export default defineConfig({
17+
site: 'https://mastrojs.github.io',
1718
integrations: [
1819
starlight({
1920
title: 'Mastro',

0 commit comments

Comments
 (0)