Skip to content

Commit d83eb92

Browse files
author
Erik Soehnel
committed
workflow to deploy the viewer app
1 parent bb01e17 commit d83eb92

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/app.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Based on the github actions "static" template
2+
name: Deploy viewer app
3+
4+
on:
5+
# run if the app changed on master
6+
push:
7+
branches: ["master"]
8+
paths: ["app/**", ".github/workflows/app.yml"]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
jobs:
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Set up Node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 22
38+
cache: 'npm'
39+
- name: Install dependencies
40+
run: |
41+
cd app
42+
npm ci
43+
- name: Build
44+
run: |
45+
cd app
46+
npm run build
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: app/dist
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)