-
-
Notifications
You must be signed in to change notification settings - Fork 860
59 lines (51 loc) · 1.4 KB
/
web-actions.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
name: Web Build
on:
workflow_call:
inputs:
env_name:
required: true
default: default
type: string
ref:
required: false
type: string
NVMRC:
required: true
type: string
secrets:
MAPBOX_ACCESS_TOKEN:
required: true
MAPBOX_DOWNLOAD_TOKEN:
required: true
ENV_MAPBOX_ACCESS_TOKEN:
required: false
ENV_MAPBOX_DOWNLOAD_TOKEN:
required: false
jobs:
build_example:
name: Example Build for Web
runs-on: ubuntu-latest
environment: ${{ inputs.env_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
if: ${{ inputs.ref == '' }}
- name: Checkout fork
uses: actions/checkout@v4
if: ${{ inputs.ref != '' }}
with:
ref: ${{ inputs.ref }}
- name: Setup node ${{ inputs.NVMRC }}
uses: actions/[email protected]
with:
node-version: ${{ inputs.NVMRC }}
- run: echo $MAPBOX_ACCESS_TOKEN > ./accesstoken
working-directory: example
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN || secrets.ENV_MAPBOX_ACCESS_TOKEN }}
- run: yarn install --network-timeout 1000000
working-directory: example
- run: yarn postinstall
working-directory: example
- run: npx expo export --platform web
working-directory: example