mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-13 19:40:24 +03:00
Update deploy-preview.yml for short sha (#4475)
* Update deploy-preview.yml for short sha * Fixing to use pages-deployment-alias-url
This commit is contained in:
parent
16c3b2ee4a
commit
36fd8f57c9
1 changed files with 8 additions and 2 deletions
10
.github/workflows/deploy-preview.yml
vendored
10
.github/workflows/deploy-preview.yml
vendored
|
@ -54,19 +54,25 @@ jobs:
|
||||||
name: dist-files
|
name: dist-files
|
||||||
path: src/dist
|
path: src/dist
|
||||||
|
|
||||||
|
- name: Set short git commit SHA
|
||||||
|
id: vars
|
||||||
|
run: |
|
||||||
|
calculatedSha=$(echo ${{ github.event.pull_request.head.sha }} | head -c 8)
|
||||||
|
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Deploy to Cloudflare
|
- name: Deploy to Cloudflare
|
||||||
id: deploy
|
id: deploy
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy src/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch ${{ github.head_ref }} --commit-dirty=true
|
command: pages deploy src/dist --project-name=${{ vars.CLOUDFLARE_PROJECT_NAME }} --branch=${{ env.COMMIT_SHORT_SHA }} --commit-dirty=true
|
||||||
|
|
||||||
- name: Add deployment comment
|
- name: Add deployment comment
|
||||||
uses: thollander/actions-comment-pull-request@v3
|
uses: thollander/actions-comment-pull-request@v3
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
Preview URL: ${{ steps.deploy.outputs.deployment-url }}
|
Preview URL: ${{ steps.deploy.outputs.pages-deployment-alias-url }}
|
||||||
reactions: eyes, rocket
|
reactions: eyes, rocket
|
||||||
comment-tag: 'Preview URL'
|
comment-tag: 'Preview URL'
|
||||||
mode: recreate
|
mode: recreate
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue