-
Notifications
You must be signed in to change notification settings - Fork 172
57 lines (54 loc) · 1.78 KB
/
staging.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
name: Build and Deploy Staging Instance
on:
push:
branches: [ main ]
permissions:
contents: read
jobs:
build-deploy:
if: github.repository == 'openstreetmap/id-tagging-schema'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# install and build development version of id-tagging-schema
- run: npm clean-install
- run: npm run translations
env:
transifex_password: ${{secrets.TX_TOKEN}}
if: env.transifex_password != null
- run: npm run dist
# install and build development version of iD using freshest version of presets and ELI
- uses: actions/checkout@v4
with:
repository: openstreetmap/id
path: './iD'
- run: npm clean-install
working-directory: './iD'
- run: npm install editor-layer-index
working-directory: './iD'
- run: mkdir dist/data
working-directory: './iD'
- run: npm run imagery
working-directory: './iD'
- run: npm run all
working-directory: './iD'
- run: npm run translations
working-directory: './iD'
env:
transifex_password: ${{secrets.TX_TOKEN}}
if: env.transifex_password != null
- run: mkdir iD/dist/id-tagging-schema && mv dist iD/dist/id-tagging-schema/dist
- run: npm run dist
working-directory: './iD'
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 --prod --dir=iD/dist