test working directory in up action #151
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@8e8162bf7f84b171787e55c6b058dcbfea5e21f1 | |
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 |