chore(builds): web and mobile. Hot fix. (#1515) #595
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
on: | |
push: | |
branches: [main] | |
paths: | |
- "native/ReleaseNotes/**" | |
- "minifier/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
TURBO_URL: ${{ secrets.TURBO_URL }} | |
TURBO_CODE: ${{ secrets.TURBO_CODE }} | |
permissions: | |
contents: read | |
deployments: write | |
name: Deploy | |
steps: | |
- uses: actions/[email protected] | |
- uses: oven-sh/[email protected] | |
- name: bun install | |
run: cd minifier && bun start | |
shell: bash {0} | |
- name: copy json definitions | |
run: cd minifier && mv json ../native/public | |
- uses: pnpm/[email protected] | |
with: | |
version: 9.0.5 | |
- name: install dependencies | |
run: cd native && pnpm install --frozen-lockfile | |
- name: add .env file | |
run: cd native && echo '${{ secrets.CLIENT_SECRETS_WEB }}' > .env | |
- name: build # Plus workaround cloudflare not uploading the node_modules folder | |
run: | | |
cd native | |
rm -rf metro.config.js | |
mv metro.config.web metro.config.js | |
pnpm expo export --source-maps --platform web | |
mv dist/assets/node_modules/* dist/assets/ | |
find dist/_expo/static/js/web/ -type f -print0 | xargs -0 sed -i 's/assets\/node_modules/assets/g' | |
- name: deploy website | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: gg-app | |
directory: native/dist | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |