-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.23 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build client
on:
push:
branches: ['main']
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
environment: configurations
strategy:
matrix:
node-version: [lts/iron]
steps:
- uses: actions/checkout@v3
- name: Use node.js ${{matrix.node-version}}
uses: actions/setup-node@v3
with:
node-version: ${{matrix.node-version}}
- name: Build
run: |
echo "API Base: $API_BASE_URL"
echo "KC URL: $AUTHORIZE_URL"
echo "TOKEN URL: $TOKEN_URL"
export PITANGA_API_BASE_URL=$API_BASE_URL
export PITANGA_AUTHORIZE_URL=$AUTHORIZE_URL
export PITANGA_TOKEN_URL=$TOKEN_URL
export PITANGA_CLIENT_HOST=$CLIENT_HOST
cd pitangaweb
npm install
npm run build
cp ./dist/index.html ./dist/404.html
env:
API_BASE_URL: ${{ vars.API_BASE_URL }}
AUTHORIZE_URL: ${{ vars.AUTHORIZE_URL }}
TOKEN_URL: ${{ vars.TOKEN_URL }}
CLIENT_HOST: ${{ vars.CLIENT_HOST }}
- name: Deploy to gh pages
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: pitangaweb/dist