Skip to content

add another

add another #941

Workflow file for this run

name: ci
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/v6
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: COLOR=1 ./make.sh
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DOCUSAURUS_IGNORE_SSG_WARNINGS: true
nofixups:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init
- run: COLOR=1 ./ci/sub/bin/nofixups.sh
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
spell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install cspell
run: npm install -g cspell
- name: Run spell check
run: |
ERRORS=$(cspell "**/*.md" --config .cspell.json --no-exit-code --quiet | grep 'fix:' || true)
if [ -n "$ERRORS" ]; then
echo "Spelling errors found:"
echo "$ERRORS"
exit 1
else
echo "No spelling errors found"
fi
alt-tags-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for missing alt attributes
run: ./scripts/check-alt-tags.sh
webp-versions-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for missing WebP versions
run: ./ci/check-webp-versions.sh
deploy:
needs: [ci, nofixups, spell-check, alt-tags-check, webp-versions-check]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/v6
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Deploy to production
run: ./ci/deploy.sh
env:
D2_DOCS_S3_BUCKET: ${{ secrets.D2_DOCS_S3_BUCKET }}
D2_DOCS_CLOUDFRONT_ID: ${{ secrets.D2_DOCS_CLOUDFRONT_ID }}
D2_DOCS_ALGOLIA_CRAWLER_API_KEY: ${{ secrets.D2_DOCS_ALGOLIA_CRAWLER_API_KEY }}