mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-17 16:25:31 -04:00
lint literally ALL the things 🚓
This commit is contained in:
44
.github/dependabot.yml
vendored
44
.github/dependabot.yml
vendored
@@ -1,26 +1,26 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
versioning-strategy: increase
|
||||
ignore:
|
||||
- dependency-name: "@types/*"
|
||||
- dependency-name: "@fontsource/*"
|
||||
labels:
|
||||
- "📦 dependencies"
|
||||
commit-message:
|
||||
prefix: "📦 npm:"
|
||||
open-pull-requests-limit: 99
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
versioning-strategy: increase
|
||||
ignore:
|
||||
- dependency-name: "@types/*"
|
||||
- dependency-name: "@fontsource/*"
|
||||
labels:
|
||||
- "📦 dependencies"
|
||||
commit-message:
|
||||
prefix: "📦 npm:"
|
||||
open-pull-requests-limit: 99
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
labels:
|
||||
- "📦 dependencies"
|
||||
commit-message:
|
||||
prefix: "📦 ci:"
|
||||
open-pull-requests-limit: 99
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
labels:
|
||||
- "📦 dependencies"
|
||||
commit-message:
|
||||
prefix: "📦 ci:"
|
||||
open-pull-requests-limit: 99
|
||||
|
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@@ -3,7 +3,7 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@@ -11,29 +11,29 @@ jobs:
|
||||
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: 14.x
|
||||
cache: yarn
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn lint
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: yarn
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn lint
|
||||
|
||||
snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
if: "github.actor == 'jakejarvis' && !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: 14.x
|
||||
cache: yarn
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: NODE_ENV=production yarn build
|
||||
- run: npx -p @percy/cli percy snapshot ./public
|
||||
env:
|
||||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
cache: yarn
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: NODE_ENV=production yarn build
|
||||
- run: npx -p @percy/cli percy snapshot ./public
|
||||
env:
|
||||
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
|
||||
|
95
.github/workflows/post-deploy.yml
vendored
95
.github/workflows/post-deploy.yml
vendored
@@ -1,7 +1,6 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
deployment_status
|
||||
on: deployment_status
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -12,49 +11,49 @@ jobs:
|
||||
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: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: yarn install --frozen-lockfile
|
||||
- uses: getsentry/action-release@v1
|
||||
if: github.event.deployment_status.environment == 'production'
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: jakejarvis
|
||||
SENTRY_PROJECT: jarvis
|
||||
with:
|
||||
environment: ${{ github.event.deployment_status.environment }}
|
||||
- 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'
|
||||
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: github.event.deployment_status.environment == '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
|
||||
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/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: lhci-results
|
||||
path: ./.lighthouseci
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- run: yarn install --frozen-lockfile
|
||||
- uses: getsentry/action-release@v1
|
||||
if: github.event.deployment_status.environment == 'production'
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: jakejarvis
|
||||
SENTRY_PROJECT: jarvis
|
||||
with:
|
||||
environment: ${{ github.event.deployment_status.environment }}
|
||||
- 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'
|
||||
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: github.event.deployment_status.environment == '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
|
||||
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/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: lhci-results
|
||||
path: ./.lighthouseci
|
||||
|
10
.github/workflows/purge-artifacts.yml
vendored
10
.github/workflows/purge-artifacts.yml
vendored
@@ -2,14 +2,14 @@ name: Purge old artifacts
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 9 * * 3' # every Wednesday at 9 AM UTC == 5 AM EDT
|
||||
- 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
|
||||
- uses: kolpav/purge-artifacts-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
expire-in: 0
|
||||
|
34
.github/workflows/webmentions.yml
vendored
34
.github/workflows/webmentions.yml
vendored
@@ -2,26 +2,26 @@ name: Fetch Webmentions
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 */12 * * *' # run every twelve hours at top of hour
|
||||
- cron: "0 */12 * * *" # run every twelve hours at top of hour
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
fetch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
lfs: false
|
||||
- name: Get webmentions data
|
||||
run: wget -nv -O data/webmentions.json "https://webmention.io/api/mentions.json?domain=jarv.is&token=$WEBMENTIONS_TOKEN"
|
||||
env:
|
||||
WEBMENTIONS_TOKEN: ${{ secrets.WEBMENTIONS_TOKEN }}
|
||||
- name: Format JSON
|
||||
run: npx prettier --write data/webmentions.json
|
||||
- name: Push changes
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git commit -am "Add new webmentions 🎉" || echo "No new mentions... 😢"
|
||||
git push origin main
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
lfs: false
|
||||
- name: Get webmentions data
|
||||
run: wget -nv -O data/webmentions.json "https://webmention.io/api/mentions.json?domain=jarv.is&token=$WEBMENTIONS_TOKEN"
|
||||
env:
|
||||
WEBMENTIONS_TOKEN: ${{ secrets.WEBMENTIONS_TOKEN }}
|
||||
- name: Format JSON
|
||||
run: npx prettier --write data/webmentions.json
|
||||
- name: Push changes
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git commit -am "Add new webmentions 🎉" || echo "No new mentions... 😢"
|
||||
git push origin main
|
||||
|
Reference in New Issue
Block a user