Skip to content

Commit 0aca6a9

Browse files
authored
Create gh pages node build
1 parent a4a0c44 commit 0aca6a9

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/node_to_gh.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Node.js GHP build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [18.x]
15+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
cache-dependency-path: 'admin-api-frontend'
25+
- name: Setup Pages
26+
uses: actions/configure-pages@v4
27+
- run: npm ci
28+
working-directory: 'admin-api-frontend'
29+
- run: npm run build --if-present
30+
working-directory: 'admin-api-frontend'
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: "admin-api-frontend/build/"
35+
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
needs: build
42+
steps:
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4
46+
permissions:
47+
contents: read
48+
pages: write
49+
id-token: write

0 commit comments

Comments
 (0)