Skip to content

Commit d2d8700

Browse files
committed
Enable GitHub Pages deployment
1 parent 6d3870c commit d2d8700

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository using Git
18+
uses: actions/checkout@v3
19+
- name: Install, build, and upload website
20+
uses: withastro/action@v0
21+
with:
22+
node-version: 20
23+
24+
deploy:
25+
needs: build
26+
runs-on: ubuntu-latest
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
steps:
31+
- name: Deploy to GitHub Pages
32+
id: deployment
33+
uses: actions/deploy-pages@v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mce.codes
22

3-
My personal website, built with [Astro](https://astro.build).
3+
My personal website, built with [Astro](https://astro.build) and deployed on [GitHub Pages](https://pages.github.com).
44

55
## Third-party assets and attributions
66

astro.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ const generateIdsPlugin: PluginOption = {
250250
};
251251

252252
export default <AstroUserConfig>{
253+
site: "https://mce.codes",
253254
scopedStyleStrategy: "class",
254255
experimental: { assets: true },
255256
integrations: [optimizeImagesIntegration, compress({ img: false })],

0 commit comments

Comments
 (0)