mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Split workflow into build and check
This commit is contained in:
parent
97e2e8497a
commit
8fa269b635
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@ -36,7 +36,37 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
npm:
|
npm-build:
|
||||||
|
name: Build sources
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js runtime
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
|
||||||
|
- name: Set up Node.js dependency cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
path: node_modules
|
||||||
|
|
||||||
|
- name: Set up Node.js dependencies
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
npm run build
|
||||||
|
git diff --name-only
|
||||||
|
|
||||||
|
npm-check:
|
||||||
|
name: Check sources
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@ -62,12 +92,8 @@ jobs:
|
|||||||
- name: Check project
|
- name: Check project
|
||||||
run: npm run check
|
run: npm run check
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
run: |
|
|
||||||
npm run build
|
|
||||||
git diff --name-only
|
|
||||||
|
|
||||||
pypi:
|
pypi:
|
||||||
|
name: Publish Python package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@ -94,6 +120,7 @@ jobs:
|
|||||||
run: twine upload --disable-progress-bar -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
|
run: twine upload --disable-progress-bar -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
|
name: Publish Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user