Skip to content

Commit 7b44cc9

Browse files
fix: disable Jekyll and add GitHub Actions workflow for Astro Pages deployments
1 parent 7194a3c commit 7b44cc9

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy Astro to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build Astro
29+
run: npm run build
30+
31+
- name: Add .nojekyll
32+
run: touch dist/.nojekyll
33+
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v2
36+
with:
37+
path: ./dist
38+
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v2

app/astro.config.mjs

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

4-
// https://astro.build/config
5-
export default defineConfig({});
4+
export default defineConfig({
5+
site: 'https://nitrovim.github.io/',
6+
});

0 commit comments

Comments
 (0)