Install pyenv
:
brew install pyenv
Create symbolic link:
import { WebView } from 'react-native-webview'; | |
export default function App() { | |
return ( | |
<WebView | |
source={{ uri: 'https://example.com/' }} | |
style={{ marginTop: 20 }} | |
/> | |
); | |
} |
{ | |
"public": "dist", | |
"rewrites": [{ "source": "**", "destination": "/index.html" }], | |
"headers": [ | |
{ | |
"source": "**", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "public, max-age=0, must-revalidate" |
{ | |
"scripts": { | |
"build": "parcel build", | |
"start": "serve" | |
}, | |
"dependencies": { | |
"serve": "latest" | |
} | |
} |
name: Heroku Pull Request | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
jobs: | |
heroku-pull-request: | |
runs-on: ubuntu-latest | |
env: | |
HEROKU_APP_NAME: my-app-pr-${{ github.event.number }} |
- name: Destroy Heroku app | |
if: github.event.action == 'closed' | |
run: heroku apps:destroy --app=${{ env.HEROKU_APP_NAME }} --confirm=${{ env.HEROKU_APP_NAME }} |
- name: Add comment to PR | |
if: github.event.action == 'opened' | |
run: | | |
gh pr comment ${{ github.event.number }} --body '[Heroku app](https://dashboard.heroku.com/apps/${{ env.HEROKU_APP_NAME }}): https://${{ env.HEROKU_APP_NAME }}.herokuapp.com' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
- name: Push to Heroku | |
run: git push heroku ${{ github.head_ref }}:master --force |
- name: Add Heroku remote | |
run: heroku git:remote --app=${{ env.HEROKU_APP_NAME }} |
- name: Copy environment variables to Heroku app | |
if: github.event.action == 'opened' | |
run: | | |
heroku config --shell --app=my-development-app > .env | |
cat .env | tr '\n' ' ' | xargs heroku config:set --app=${{ env.HEROKU_APP_NAME }} |