-
Notifications
You must be signed in to change notification settings - Fork 1.4k
58 lines (55 loc) · 2.07 KB
/
staging.yml
File metadata and controls
58 lines (55 loc) · 2.07 KB
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
name: Build and Deploy Staging Instance
on:
push:
branches: [ main, develop ]
permissions:
contents: read
jobs:
build-deploy:
if: github.repository == 'openstreetmap/id'
runs-on: ubuntu-latest
environment: workflows
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
# install and build development version of id-tagging-schema
- name: Checkout the id-tagging-schema repository code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: openstreetmap/id-tagging-schema
path: './id-tagging-schema'
- run: npm clean-install
working-directory: './id-tagging-schema'
- run: npm audit signatures
working-directory: './id-tagging-schema'
- run: npm run translations
working-directory: './id-tagging-schema'
env:
transifex_password: ${{secrets.TX_TOKEN}}
if: env.transifex_password != null
- run: npm run dist
working-directory: './id-tagging-schema'
- name: id-tagging-schema - Create directories
run: mkdir dist/id-tagging-schema && mv id-tagging-schema/dist dist/id-tagging-schema/dist
# build iD using freshest version of presets and ELI
- run: npm clean-install
- run: npm install editor-layer-index
- run: npm audit signatures
- run: mkdir dist/data
- run: npm run imagery
- run: npm run all
- run: npm run translations
env:
transifex_password: ${{secrets.TX_TOKEN}}
if: env.transifex_password != null
- run: npm run dist
env:
ID_PRESETS_CDN_URL: './id-tagging-schema/'
# deploy to netlify
- name: Deploy to Netlify
env:
NETLIFY_AUTH_TOKEN: ${{secrets.NETLIFY_AUTH_TOKEN}}
NETLIFY_SITE_ID: ${{secrets.NETLIFY_SITE_ID}}
run: ./node_modules/.bin/netlify deploy --no-build --prod --dir=dist