This repository has been archived by the owner on Oct 22, 2023. It is now read-only.
Lock file maintenance #7693
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-22.04 | |
env: | |
TERM: xterm-256color | |
BATECT_CACHE_TYPE: directory | |
BATECT_ENABLE_TELEMETRY: true | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4.1.0 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v3.13.0 | |
with: | |
java-version: 8 | |
distribution: adopt | |
- name: Validate Batect wrapper scripts | |
uses: batect/batect-wrapper-validation-action@v0.4.0 | |
- name: Cache Batect | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ~/.batect/cache | |
key: batect-${{ hashFiles('batect') }} | |
- name: Cache dependencies | |
uses: actions/cache@v3.3.2 | |
with: | |
path: .batect/caches | |
key: batect-caches-${{ hashFiles('yarn.lock') }}-${{ hashFiles('batect.yml') }} | |
- name: Download dependencies | |
run: ./batect setup | |
- name: Build | |
run: ./batect build | |
- name: Check formatting | |
run: ./batect check-format | |
- name: Check for linting issues | |
run: ./batect lint | |
# - name: Check for broken links | |
# run: ./batect check-links | |
- name: Check for broken redirects | |
run: ./batect check-redirects | |
- name: Deploy | |
run: ./batect deploy | |
if: github.event_name == 'push' && github.repository == 'batect/batect.dev' && github.ref == 'refs/heads/main' | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
DEPLOY_DESCRIPTION: "Deploy commit ${{ github.sha }} from GitHub Actions" | |
- name: Update search index | |
run: ./batect update-search-index | |
if: github.event_name == 'push' && github.repository == 'batect/batect.dev' && github.ref == 'refs/heads/main' | |
env: | |
API_KEY: ${{ secrets.ALGOLIA_API_KEY }} |