mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-27 07:25:48 -04:00
trying out Sentry logging on /api/hits
This commit is contained in:
60
.github/workflows/post-deploy.yml
vendored
Normal file
60
.github/workflows/post-deploy.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Post-Deploy
|
||||
|
||||
on:
|
||||
deployment_status
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.deployment_status.state == 'success'
|
||||
env:
|
||||
LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
LHCI_SERVER_BASE_URL: https://lhci.jrvs.io
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: getsentry/action-release@v1
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: jakejarvis
|
||||
SENTRY_PROJECT: jarvis
|
||||
with:
|
||||
environment: ${{ github.event.deployment_status.environment }}
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12.x
|
||||
- uses: browser-actions/setup-chrome@latest
|
||||
with:
|
||||
chrome-version: stable
|
||||
- run: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install -g @lhci/cli
|
||||
- run: |
|
||||
chrome --version
|
||||
lhci --version
|
||||
curl $LHCI_SERVER_BASE_URL/version
|
||||
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'
|
||||
continue-on-error: true
|
||||
env:
|
||||
BASE_URL: https://jarv.is
|
||||
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: main
|
||||
run: |
|
||||
lhci autorun \
|
||||
--collect.url=$BASE_URL/ \
|
||||
--collect.url=$BASE_URL/notes/how-to-pull-request-fork-github/
|
||||
- if: github.event.deployment_status.environment == 'preview'
|
||||
continue-on-error: true
|
||||
env:
|
||||
BASE_URL: ${{ github.event.deployment_status.target_url }}
|
||||
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: ${{ github.event.deployment.ref }}
|
||||
run: |
|
||||
lhci autorun \
|
||||
--collect.url=$BASE_URL/ \
|
||||
--collect.url=$BASE_URL/notes/how-to-pull-request-fork-github/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: lhci-results
|
||||
path: ./.lighthouseci
|
||||
Reference in New Issue
Block a user