Skip to content

Commit 0dcf0d8

Browse files
ci: add astro build capabilities
1 parent 15b7961 commit 0dcf0d8

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# copied from astro docs: https://docs.astro.build/en/guides/deploy/github/#configure-a-github-action
2+
name: Deploy to GitHub Pages
3+
4+
on:
5+
# Trigger the workflow every time you push to the `main` branch
6+
# Using a different branch name? Replace `main` with your branch’s name
7+
push:
8+
branches: [ main ]
9+
# Allows you to run this workflow manually from the Actions tab on GitHub.
10+
workflow_dispatch:
11+
12+
# Allow this job to clone the repo and create a page deployment
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout your repository using git
23+
uses: actions/checkout@v4
24+
- name: Install, build, and upload your site
25+
uses: withastro/action@v3
26+
# with:
27+
# path: . # The root location of your Astro project inside the repository. (optional)
28+
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
29+
# 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)
30+
31+
deploy:
32+
needs: build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

.github/workflows/gatsby.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: GitHub Pages [Publish]
33
on:
44
push:
55
branches: ["gatsby"]
6+
workflow_dispatch:
67

78
jobs:
89
build:

astro.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
import { defineConfig } from 'astro/config';
33

44
// https://astro.build/config
5-
export default defineConfig({});
5+
export default defineConfig({
6+
site: 'https://ubcigem.com',
7+
})

public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ubcigem.com

0 commit comments

Comments
 (0)