Specify working directory
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 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
How do we set the directory using the expo/expo-github-action@v8 action ?
How do we set the directory using the
expo/expo-github-action@v8action ?
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
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"
}
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?