Skip to content

Commit

Permalink
style: reformat indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Integralist committed Mar 8, 2024
1 parent e1d4720 commit a4ed36a
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions preview/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,48 @@ outputs:
value: ${{ steps.service-name.outputs.SERVICE_NAME }}

runs:
using: "composite"
steps:
- uses: actions/checkout@v3
# Download Fastly CLI
- name: Set up Fastly CLI
uses: fastly/compute-actions/setup@v4
with:
token: ${{ inputs.github-token }}
cli_version: '10.2.4'
- run: yarn
shell: bash

# Create a new Fastly Service name with the PR number appended
- name: Set service-name
id: service-name
run: echo "SERVICE_NAME=$(yq '.name' fastly.toml)-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
shell: bash

# Delete the Fastly Service
- if: github.event.action == 'closed'
run: fastly service delete --quiet --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} --force --token ${{ inputs.fastly-api-token }} || true
shell: bash

# Deploy to Fastly and let Fastly choose a subdomain of edgecompute.app to attach to the service
- if: github.event.action != 'closed'
run: |
fastly compute publish --verbose -i --token ${{ inputs.fastly-api-token }} --service-name ${{ steps.service-name.outputs.SERVICE_NAME }}
shell: bash
# Retrieve the newly created domain for the service and add it to the pull-request summary
- if: github.event.action != 'closed'
run: fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name'
shell: bash

- if: github.event.action != 'closed'
name: Set domain
shell: bash
id: domain
run: echo "DOMAIN=$(fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name')" >> "$GITHUB_OUTPUT"

- if: github.event.action != 'closed'
shell: bash
name: Add domain to summary
run: echo 'This pull-request has been deployed to Fastly and is available at <https://${{ steps.domain.outputs.DOMAIN }}> 🚀' >> $GITHUB_STEP_SUMMARY
using: "composite"
steps:
- uses: actions/checkout@v4

# Download Fastly CLI
- name: Set up Fastly CLI
uses: fastly/compute-actions/setup@v5
with:
token: ${{ inputs.github-token }}
cli_version: '10.8.4'
- run: yarn
shell: bash

# Create a new Fastly Service name with the PR number appended
- name: Set service-name
id: service-name
run: echo "SERVICE_NAME=$(yq '.name' fastly.toml)-${{ github.event.number }}" >> "$GITHUB_OUTPUT"
shell: bash

# Delete the Fastly Service
- if: github.event.action == 'closed'
run: fastly service delete --quiet --service-name ${{ steps.service-name.outputs.SERVICE_NAME }} --force --token ${{ inputs.fastly-api-token }} || true
shell: bash

# Deploy to Fastly and let Fastly choose a subdomain of edgecompute.app to attach to the service
- if: github.event.action != 'closed'
run: |
fastly compute publish --verbose -i --token ${{ inputs.fastly-api-token }} --service-name ${{ steps.service-name.outputs.SERVICE_NAME }}
shell: bash

# Retrieve the newly created domain for the service and add it to the pull-request summary
- if: github.event.action != 'closed'
run: fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name'
shell: bash

- if: github.event.action != 'closed'
name: Set domain
shell: bash
id: domain
run: echo "DOMAIN=$(fastly domain list --quiet --version latest --json --service-name="${{ steps.service-name.outputs.SERVICE_NAME }}" --token ${{ inputs.fastly-api-token }} | jq -r '.[0].Name')" >> "$GITHUB_OUTPUT"

- if: github.event.action != 'closed'
shell: bash
name: Add domain to summary
run: echo 'This pull-request has been deployed to Fastly and is available at <https://${{ steps.domain.outputs.DOMAIN }}> 🚀' >> $GITHUB_STEP_SUMMARY

0 comments on commit a4ed36a

Please sign in to comment.