forked from GeoNode/geonode-mapstore-client
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.01 KB
/
main.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# This is a basic workflow to help you get started with Actions
name: GeoNode Client CI (build - main.yml)
concurrency:
group: "client_build"
cancel-in-progress: true
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the master branch
push:
branches: [ redirect ]
paths:
- "geonode_mapstore_client/client/**"
- "!geonode_mapstore_client/client/version.txt"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_and_commit:
env:
working-directory: ./geonode_mapstore_client/client
runs-on: ubuntu-latest
steps:
- name: "Checking out"
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
###########
# SET UP
#########
- name: "Setting up npm"
uses: actions/setup-node@v2
with:
node-version: '12.x'
############
# CACHING
##########
- name: "Cache node modules"
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
###############
# NPM BUILD
#############
- name: "Run npm install"
run: npm install
working-directory: ${{env.working-directory}}
- name: "Run npm compile"
run: npm run compile
working-directory: ${{env.working-directory}}
###############
# COMMIT
#############
- name: "Stage files"
run: git add --all
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v3