[pre-commit.ci] pre-commit autoupdate #255
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: build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9"] | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-all | |
with: | |
path: | | |
.nox | |
~/.cache/pre-commit | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('pyproject.yaml') }} | |
- name: Install pip and nox | |
run: | | |
python -m pip install --upgrade pip | |
pip install nox | |
- name: Lint | |
run: | | |
nox -s lint | |
- name: Build | |
run: | | |
nox -s build --python ${{ matrix.python-version }} | |
- name: Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Read lamin-project.yaml | |
id: lamin-project | |
uses: CumulusDS/get-yaml-paths-action@v0.1.0 | |
with: | |
file: lamin-project.yaml | |
project_slug: project_slug | |
- name: Deploy docs | |
id: netlify | |
uses: nwtgck/actions-netlify@v1.2 | |
with: | |
publish-dir: "_build/html" | |
production-deploy: ${{ github.event_name == 'push' }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-commit-comment: false | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |