Skip to content

Commit 508c431

Browse files
committed
add a github action to deploy apps to github pages
1 parent 396acce commit 508c431

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/deploy_pages.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
paths:
7+
- "packages/utils/**"
8+
- "apps/hyparquet-demo/**"
9+
- "apps/hightable-demo/**"
10+
- ".github/workflows/deploy_pages.yml"
11+
workflow_dispatch:
12+
13+
jobs:
14+
# Build job
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout the repository
19+
uses: actions/checkout@v4
20+
- name: Install dependencies
21+
run: npm i
22+
- name: Build @hyparam/utils package
23+
run: npm run build
24+
working-directory: ./packages/utils
25+
- name: Build hyparquet demo
26+
run: npm run build
27+
working-directory: ./apps/hyparquet-demo
28+
- name: Build hightable demo
29+
run: npm run build
30+
working-directory: ./apps/hightable-demo
31+
- name: Move the build outputs to a folder
32+
run: |
33+
mkdir build_outputs_folder
34+
mv ./apps/hyparquet-demo/dist build_outputs_folder/hyparquet-demo
35+
mv ./apps/hightable-demo/dist build_outputs_folder/hightable-demo
36+
- name: Upload static files as artifact
37+
id: deployment
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: build_outputs_folder/
41+
42+
# Deploy job
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)