Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Jan 28, 2025
1 parent 50e2d36 commit a883c46
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions actions/preview/action.yml
Original file line number Diff line number Diff line change
@@ -11,8 +11,6 @@ inputs:
default: true
required: false



runs:
using: "composite"
steps:
@@ -37,13 +35,13 @@ runs:
echo "IS_CLEANUP: ${{ steps.type.outputs.IS_CLEANUP }}"
- name: Cleanup
if: ${{ steps.type.outputs.IS_CLEANUP }}
if: steps.type.outputs.IS_CLEANUP
shell: bash
run: |
aws s3 rm "s3://elastic-docs-v3-website-preview/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" --recursive
- name: Delete GitHub environment
if: ${{ steps.type.outputs.IS_CLEANUP }}
if: steps.type.outputs.IS_CLEANUP
uses: actions/github-script@v7
with:
script: |
@@ -69,7 +67,7 @@ runs:
}
- name: Create Deployment
if: ${{ steps.type.outputs.IS_DEPLOYMENT }}
if: steps.type.outputs.IS_DEPLOYMENT
uses: actions/github-script@v7
id: deployment
with:
@@ -111,7 +109,7 @@ runs:
return deployment.data.id
- name: Generate Path Prefix
if: ${{ steps.type.outputs.IS_DEPLOYMENT }}
if: steps.type.outputs.IS_DEPLOYMENT
id: path-prefix
shell: bash
run: |
@@ -122,23 +120,23 @@ runs:
fi
- name: Build public documentation
if: ${{ steps.type.outputs.IS_DEPLOYMENT }}
if: steps.type.outputs.IS_DEPLOYMENT
uses: elastic/docs-builder@main
continue-on-error: ${{ inputs.strict != 'true' }} # Will be removed after the migration phase
with:
prefix: ${{ steps.path-prefix.outputs.result }}
strict: ${{ inputs.strict }}

- name: Upload artifact
if: ${{ steps.type.outputs.IS_DEPLOYMENT }}
if: steps.type.outputs.IS_DEPLOYMENT
shell: bash
run: |
aws s3 sync .artifacts/docs/html s3://elastic-docs-v3-website-preview${{steps.path-prefix.outputs.result}} --delete --quiet
aws cloudfront create-invalidation --distribution-id EKT7LT5PM8RKS --paths "${{steps.path-prefix.outputs.result}}/*"
- name: Update deployment status
uses: actions/github-script@v7
if: always() && ${{ steps.type.outputs.IS_DEPLOYMENT }}
if: always() && steps.type.outputs.IS_DEPLOYMENT
with:
script: |
await github.rest.repos.createDeploymentStatus({

0 comments on commit a883c46

Please sign in to comment.