Skip to content

Commit bcd2511

Browse files
authored
feat: add github page publish action
1 parent 821b00e commit bcd2511

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/publish.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions: read-all
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
15+
16+
- name: Setup node
17+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # tag=v4.4.0
18+
with:
19+
node-version: 22
20+
21+
- name: Build UI
22+
run: |
23+
npm i
24+
npm run build
25+
26+
- name: Upload artifact
27+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # tag=v3.0.1
28+
with:
29+
path: dist
30+
retention-days: 1
31+
32+
deploy:
33+
needs: build
34+
35+
permissions:
36+
pages: write
37+
id-token: write
38+
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # tag=v4.0.5

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
This is a simple application using [Pelagos](https://github.com/bluecatengineering/pelagos-packages).
44

5-
To run, do the usual (make sure you have `node`, run `npm i`, ...) and then `npm start`.
5+
To run locally, do the usual (make sure you have `node`, run `npm i`, ...) and then `npm start`.
6+
7+
To view in browser, visit https://bluecatengineering.github.io/pelagos-example/
68

79
## Preview
810

0 commit comments

Comments
 (0)