Skip to content

Commit 441fa84

Browse files
committed
feat: astro deploy workflow
1 parent 83be2b7 commit 441fa84

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
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+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [main]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
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: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
// @ts-check
2-
import { defineConfig } from 'astro/config';
2+
import { defineConfig } from "astro/config";
33

4-
import react from '@astrojs/react';
4+
import react from "@astrojs/react";
55

66
// https://astro.build/config
77
export default defineConfig({
8-
integrations: [react()]
9-
});
8+
site: "https://lizainslie.github.io",
9+
base: "/startpage",
10+
integrations: [react()],
11+
});

0 commit comments

Comments
 (0)