Skip to content

Commit a76b826

Browse files
authored
Merge pull request #19 from SolidLabResearch/master
Add CI/CD for deploying to github pages
2 parents bcd4605 + b20385f commit a76b826

3 files changed

Lines changed: 78 additions & 1 deletion

File tree

.github/workflows/static.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy to github pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["development-milestones"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: '16'
36+
37+
- name: Install and Build
38+
run: |
39+
cd solid-watchparty/
40+
npm install
41+
npm run build
42+
43+
- name: Upload Build Artifact
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: dist
47+
path: './dist/'
48+
49+
# Single deploy job since we're just deploying
50+
deploy:
51+
needs: build
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v4
59+
60+
- name: Download Build Artifact
61+
uses: actions/download-artifact@v3
62+
with:
63+
name: dist
64+
path: './dist/'
65+
66+
- name: Setup Pages
67+
uses: actions/configure-pages@v4
68+
69+
- name: Upload artifact
70+
uses: actions/upload-pages-artifact@v3
71+
with:
72+
path: './dist/'
73+
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
documentation/
2+
dist/

solid-watchparty/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export default defineConfig({
77
base: './',
88
build: {
99
outDir: '../dist'
10-
}
10+
},
1111
})

0 commit comments

Comments
 (0)