name: Deploy Expo Preview on: pull_request: jobs: deploy_branch_preview: name: Deploy Branch Preview runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 12.x - uses: expo/expo-github-action@v5 with: expo-packager: yarn expo-username: ${{ secrets.EXPO_CLI_USERNAME }} expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} expo-cache: true - name: Cache Node Modules uses: actions/cache@v2 env: cache-name: cache-node-modules with: path: ~/.cache/yarn key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - name: Install Packages run: | corepack enable yarn install - name: Expo Publish Channel run: expo publish --non-interactive --release-channel pr${{ github.event.number }} working-directory: packages/app - name: Add Comment To PR uses: mshick/add-pr-comment@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXPO_PROJECT: "@${{ secrets.EXPO_CLI_USERNAME }}/bob" with: message: | ## Application ![Expo QR](https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=exp://exp.host/${{ env.EXPO_PROJECT }}?release-channel=pr${{ github.event.number }}) Published to https://exp.host/${{ env.EXPO_PROJECT }}?release-channel=pr${{ github.event.number }}