test working directory in up action #153
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
name: Deploy Preevy environment | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
concurrency: preevy-${{ github.event.number }} | |
jobs: | |
deploy: | |
environment: | |
name: pr-${{ github.event.number }} | |
url: ${{ fromJson(steps.preevy_up.outputs.urls-map).frontend[3000] }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.PREEVY_SA_KEY }}' | |
- uses: livecycle/preevy-up-action@c291b8d7348b1af0fa3a61abc9484b5f2e1e4aa2 | |
id: preevy_up | |
with: | |
install: gh-release | |
profile-url: ${{ vars.PREEVY_PROFILE_URL }} | |
working-directory: ./frontend | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: link environment to livecycle | |
env: | |
LIVECYCLE_API_KEY: ${{ secrets.LIVECYCLE_API_KEY }} | |
PREVIEW_URL: ${{ fromJson(steps.preevy_up.outputs.urls-map).frontend[3000] }} | |
run: npx @livecycle/cli link --url=$PREVIEW_URL --from-git=. --api-key=$LIVECYCLE_API_KEY |