Skip to content

Commit db0d93a

Browse files
committed
ci(pages): add GitHub Pages deployment workflow
Add automated deployment to GitHub Pages using GitHub Actions. Workflow triggers on push to main branch and builds the site from .github/pages directory.
1 parent 0311023 commit db0d93a

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/pages/_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
title: Standard .NET Project Layout
2+
description: An opinionated .NET project layout inspired by industry patterns and best practices for .NET repositories.
3+
theme: null
4+
exclude:
5+
- README.md

.github/workflows/deploy-pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Setup Pages
26+
uses: actions/configure-pages@v5
27+
28+
- name: Build with Jekyll
29+
uses: actions/jekyll-build-pages@v1
30+
with:
31+
source: ./.github/pages
32+
destination: ./_site
33+
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v4
36+
with:
37+
path: ./_site
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@v4

0 commit comments

Comments
 (0)