Skip to content

Commit fff871c

Browse files
author
Tim Willebrands
committed
Add GitHub Actions workflow for deploying to GitHub Pages
1 parent baddbf8 commit fff871c

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy 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+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: '1.x'
28+
29+
- name: Install
30+
run: bun install --no-progress
31+
32+
- name: Build component
33+
run: bun run build
34+
35+
- name: Copy dist to docs
36+
run: |
37+
mkdir -p docs/dist
38+
cp -r dist/* docs/dist/
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: docs
44+
45+
deploy:
46+
needs: build
47+
runs-on: ubuntu-latest
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4
55+
56+

0 commit comments

Comments
 (0)