-
-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(web): ci for web build (#3501)
* chore(web): ci for web build * chore(web): fix metro resolution to use index.web.js instead of index when resolving the js version of @rnmapbox/maps, this should fix
- Loading branch information
Showing
7 changed files
with
147 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,15 @@ jobs: | |
run: node scripts/doc-generate.mjs | ||
- name: Generate example docs into maps-docs repo | ||
run: bun scripts/example-docs.ts | ||
- name: Generate example app into maps-docs repo | ||
run: | | ||
cd example | ||
echo $MAPBOX_WEB_ACCESS_TOKEN > accesstoken | ||
yarn install | ||
npx expo export -p web --outpub-dir ../../maps-docs/example-app | ||
working-directory: maps | ||
env: | ||
MAPBOX_WEB_ACCESS_TOKEN: ${{ secrets.MAPBOX_WEB_ACCESS_TOKEN }} | ||
- name: Setup deploy key for github deploy | ||
uses: webfactory/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import App from './src/App'; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
"web": { | ||
"bundler": "metro", | ||
"output": "single" | ||
}, | ||
"experiments": { | ||
"baseUrl": "/example-app" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters