mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 12:36:20 -04:00
fix LHCI branch detection
This commit is contained in:
parent
57ceac6a9e
commit
7db9c20af9
21
.github/workflows/lighthouse.yml
vendored
21
.github/workflows/lighthouse.yml
vendored
@ -11,7 +11,6 @@ jobs:
|
|||||||
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
|
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
|
||||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||||
LHCI_SERVER_BASE_URL: https://lhci.jrvs.io
|
LHCI_SERVER_BASE_URL: https://lhci.jrvs.io
|
||||||
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: ${{ github.event.deployment.ref }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -22,22 +21,30 @@ jobs:
|
|||||||
node-version: 14.x
|
node-version: 14.x
|
||||||
- run: npm install -g @lhci/cli
|
- run: npm install -g @lhci/cli
|
||||||
- run: |
|
- run: |
|
||||||
lhci --version
|
|
||||||
lhci healthcheck
|
lhci healthcheck
|
||||||
|
lhci --version
|
||||||
curl $LHCI_SERVER_BASE_URL/version
|
curl $LHCI_SERVER_BASE_URL/version
|
||||||
echo ${{ github.event.deployment_status.target_url }}
|
echo "ref: ${{ github.event.deployment.ref }}"
|
||||||
|
echo "env: ${{ github.event.deployment_status.environment }}"
|
||||||
|
echo "url: ${{ github.event.deployment_status.target_url }}"
|
||||||
- if: github.event.deployment_status.environment == 'production'
|
- if: github.event.deployment_status.environment == 'production'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
BASE_URL: https://jarv.is/
|
||||||
|
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: main
|
||||||
run: |
|
run: |
|
||||||
lhci autorun \
|
lhci autorun \
|
||||||
--collect.url=https://jarv.is/ \
|
--collect.url=$BASE_URL/ \
|
||||||
--collect.url=https://jarv.is/notes/how-to-pull-request-fork-github/
|
--collect.url=$BASE_URL/notes/how-to-pull-request-fork-github/
|
||||||
- if: github.event.deployment_status.environment == 'preview'
|
- if: github.event.deployment_status.environment == 'preview'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
BASE_URL: ${{ github.event.deployment_status.target_url }}
|
||||||
|
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: ${{ github.event.deployment.ref }}
|
||||||
run: |
|
run: |
|
||||||
lhci autorun \
|
lhci autorun \
|
||||||
--collect.url=${{ github.event.deployment_status.target_url }}/ \
|
--collect.url=$BASE_URL/ \
|
||||||
--collect.url=${{ github.event.deployment_status.target_url }}/notes/how-to-pull-request-fork-github/
|
--collect.url=$BASE_URL/notes/how-to-pull-request-fork-github/
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: lhci-results
|
name: lhci-results
|
||||||
|
Loading…
x
Reference in New Issue
Block a user