Skip to content

Update ESlint plugins (#3980) #4

Update ESlint plugins (#3980)

Update ESlint plugins (#3980) #4

name: Auto-deploy to GitHub Pages
# Builds and deploys Storybook and a Jest coverage report to owid.github.io.
# Most stuff in here is handled by https://github.com/marketplace/actions/deploy-to-github-pages
on:
push:
branches:
- master
jobs:
build-deploy-storybook-coverage:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-node-yarn-deps
- uses: ./.github/actions/build-tsc
# Note: running these two build steps subsequently means that if either `buildStorybook` or `coverage` fails,
# neither of them is deployed :(
# Let's hope this doesn't happen too often
- name: Build Storybook 🔧
run: yarn buildStorybook
- name: Generate Jest coverage report 🃏
run: yarn buildCoverage
- name: Generate coverage badge 🔖
run: |
mkdir -p badges
yarn add [email protected]
yarn lcov-badge -o badges/coverage.svg coverage/lcov.info
# We're using two subsequent deploys instead of making them parallel because `github-pages-deploy-action`
# force-pushes, and if we have two deploys running at the same time that might lead to missing update situations.
- name: Deploy Storybook 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.STORYBOOK_DEPLOY_ACCESS_TOKEN }}
branch: master
folder: .storybook/build
repository-name: owid/owid.github.io
target-folder: stories
commit-message: |-
🤖 update Storybook
owid/owid-grapher@${{ github.sha }}
git-config-name: owidbot
git-config-email: [email protected]
- name: Deploy Coverage Report 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.STORYBOOK_DEPLOY_ACCESS_TOKEN }}
branch: master
folder: coverage/lcov-report
repository-name: owid/owid.github.io
target-folder: coverage
commit-message: |-
🤖 update coverage report
owid/owid-grapher@${{ github.sha }}
git-config-name: owidbot
git-config-email: [email protected]
- name: Deploy Badges 🚀
uses: JamesIves/[email protected]
with:
token: ${{ secrets.STORYBOOK_DEPLOY_ACCESS_TOKEN }}
branch: master
folder: badges
repository-name: owid/owid.github.io
target-folder: badges
commit-message: |-
🤖 update badges
owid/owid-grapher@${{ github.sha }}
git-config-name: owidbot
git-config-email: [email protected]