mirror of
				https://github.com/jakejarvis/jarv.is.git
				synced 2025-11-04 10:30:11 -05:00 
			
		
		
		
	
							
								
								
									
										29
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,29 +0,0 @@
 | 
			
		||||
name: CI
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
  pull_request:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 1
 | 
			
		||||
      - uses: actions/setup-node@v2
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 16.x
 | 
			
		||||
          cache: yarn
 | 
			
		||||
      - run: yarn install --frozen-lockfile
 | 
			
		||||
      - run: yarn build
 | 
			
		||||
        env:
 | 
			
		||||
          SKIP_OPTIMIZE_IMAGES: true
 | 
			
		||||
      - run: yarn lint
 | 
			
		||||
      - run: npx -p @percy/cli percy snapshot ./public
 | 
			
		||||
        if: github.actor == 'jakejarvis'
 | 
			
		||||
        env:
 | 
			
		||||
          PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
 | 
			
		||||
							
								
								
									
										61
									
								
								.github/workflows/post-deploy.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										61
									
								
								.github/workflows/post-deploy.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,61 +0,0 @@
 | 
			
		||||
name: Release
 | 
			
		||||
 | 
			
		||||
on: deployment_status
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  release:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    if: github.event.deployment_status.state == 'success'
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 2
 | 
			
		||||
      - uses: actions/setup-node@v2
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 16.x
 | 
			
		||||
      - run: |
 | 
			
		||||
          LOWERENV=$(echo "${{ github.event.deployment_status.environment }}" | tr "[:upper:]" "[:lower:]")
 | 
			
		||||
          echo "NORMALIZED_ENV=${LOWERENV}" >> $GITHUB_ENV
 | 
			
		||||
      - uses: getsentry/action-release@v1
 | 
			
		||||
        if: ${{ env.NORMALIZED_ENV == 'production' }}
 | 
			
		||||
        env:
 | 
			
		||||
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
 | 
			
		||||
          SENTRY_ORG: jakejarvis
 | 
			
		||||
          SENTRY_PROJECT: jarvis
 | 
			
		||||
        with:
 | 
			
		||||
          environment: ${{ env.NORMALIZED_ENV }}
 | 
			
		||||
      - 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 https://lhci.jrvs.io/version || true
 | 
			
		||||
          echo "ref: ${{ github.event.deployment.ref }}"
 | 
			
		||||
          echo "env: ${{ env.NORMALIZED_ENV }}"
 | 
			
		||||
          echo "url: ${{ github.event.deployment_status.target_url }}"
 | 
			
		||||
      - if: ${{ env.NORMALIZED_ENV == 'production' }}
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "BASE_DEPLOY_URL=https://jarv.is" >> $GITHUB_ENV
 | 
			
		||||
          echo "LHCI_EXTRA_FLAGS=" >> $GITHUB_ENV
 | 
			
		||||
          echo "LHCI_BUILD_CONTEXT__CURRENT_BRANCH=main" >> $GITHUB_ENV
 | 
			
		||||
      - if: ${{ env.NORMALIZED_ENV == 'preview' }}
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "BASE_DEPLOY_URL=${{ github.event.deployment_status.target_url }}" >> $GITHUB_ENV
 | 
			
		||||
          echo "LHCI_EXTRA_FLAGS=--assert.assertions.is-crawlable=off --assert.assertions.canonical=off" >> $GITHUB_ENV
 | 
			
		||||
          echo "LHCI_BUILD_CONTEXT__CURRENT_BRANCH=${{ github.event.deployment.ref }}" >> $GITHUB_ENV
 | 
			
		||||
      - continue-on-error: true
 | 
			
		||||
        env:
 | 
			
		||||
          LHCI_TOKEN: ${{ secrets.LHCI_TOKEN }}
 | 
			
		||||
          LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
 | 
			
		||||
        run: |
 | 
			
		||||
          lhci autorun ${{ env.LHCI_EXTRA_FLAGS }} \
 | 
			
		||||
            --collect.url=${{ env.BASE_DEPLOY_URL }}/ \
 | 
			
		||||
            --collect.url=${{ env.BASE_DEPLOY_URL }}/notes/how-to-pull-request-fork-github/ \
 | 
			
		||||
            --collect.url=${{ env.BASE_DEPLOY_URL }}/projects/ \
 | 
			
		||||
            --collect.url=${{ env.BASE_DEPLOY_URL }}/contact/
 | 
			
		||||
      - uses: actions/upload-artifact@v2
 | 
			
		||||
        with:
 | 
			
		||||
          name: lhci-results
 | 
			
		||||
          path: ./.lighthouseci
 | 
			
		||||
							
								
								
									
										15
									
								
								.github/workflows/purge-artifacts.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/purge-artifacts.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,15 +0,0 @@
 | 
			
		||||
name: Purge old artifacts
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: "0 9 * * 3" # every Wednesday at 9 AM UTC == 5 AM EDT
 | 
			
		||||
  workflow_dispatch:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  purge-artifacts:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: kolpav/purge-artifacts-action@v1
 | 
			
		||||
        with:
 | 
			
		||||
          token: ${{ secrets.GITHUB_TOKEN }}
 | 
			
		||||
          expire-in: 0
 | 
			
		||||
		Reference in New Issue
	
	Block a user