expo-github-action icon indicating copy to clipboard operation
expo-github-action copied to clipboard

Specify working directory

Open objectiveSee opened this issue 1 year ago • 5 comments

Topic and scope of discussion

Project is in a monorepo, where the root of the RN app is ./client. How can I use this action to correctly run from my client directory?

objectiveSee avatar Jul 07 '24 17:07 objectiveSee

@objectiveSee What is the exact action that you are running? I am using the continuous-deploy-fingerprint action and I can set it with:

      - name: Continuously Deploy Development
        uses: expo/expo-github-action/continuous-deploy-fingerprint@main
        with:
          profile: development
          branch: development
          working-directory: apps/expo

tharakadesilva avatar Aug 27 '24 21:08 tharakadesilva

How do we set the directory using the expo/expo-github-action@v8 action ?

lostpebble avatar Nov 26 '24 23:11 lostpebble

How do we set the directory using the expo/expo-github-action@v8 action ?

my understanding is that this action only sets up dependencies for EAS i.e. installing the CLI globally so it doesn't have to be run from a specific directory

jancbeck avatar Mar 29 '25 21:03 jancbeck

Use working-directory

- name: Build Android app
  working-directory: apps/expo-app
  run: eas build --platform android --profile preview --local --non-interactive --output ${{ github.workspace }}/app-preview.apk

I encountered an issue with the build files being missing in other packages. Resolved it with this guide.

// apps/expo-app/package.json
"scripts": {
  "postinstall": "cd ../.. && pnpm build"
}
// package.json (root)
"scripts": {
  "build": "pnpm --filter './packages/**' build"
}

dhatGuy avatar Jun 21 '25 10:06 dhatGuy

UPDATE: I was very close, you can specify the working directory under with:, as follows:

      - name: Create preview
        uses: expo/expo-github-action/preview@b8a9be8336bf5609f8e299a8486f9a2bf7073f8a
        with:
          command: eas update --auto --platform ios --channel development --environment development
          working-directory: apps/native

As described in the READE of the preview action: https://github.com/expo/expo-github-action/tree/main/preview/README.md


I'm really racking my head over this. Why is this so hard? I tried setting working-directory on the expo/expo-github-action/preview step, but that results in.

Invalid workflow file: .github/workflows/eas-update.yml#L1
(Line: 44, Col: 9): Unexpected value 'working-directory'

@dhatGuy I believe you worked around that by dropping uses: expo/expo-github-action/preview and executing run. Does the action still post the update link / QR code to the pull request in your setup?

hammond756 avatar Dec 16 '25 21:12 hammond756