mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed GitHub actions to rebuild instead of upload artifacts
This commit is contained in:
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@@ -32,9 +32,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Limit clone depth to speed up build
|
# Limit clone depth to speed up build
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 5
|
|
||||||
|
|
||||||
# Install Node runtime and dependencies
|
# Install Node runtime and dependencies
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
@@ -57,13 +55,6 @@ jobs:
|
|||||||
# Check diff after build
|
# Check diff after build
|
||||||
- run: git diff --name-only
|
- run: git diff --name-only
|
||||||
|
|
||||||
# Upload distribution files
|
|
||||||
- uses: actions/upload-artifact@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
|
||||||
with:
|
|
||||||
name: material
|
|
||||||
path: material
|
|
||||||
|
|
||||||
# Build and deploy documentation site
|
# Build and deploy documentation site
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
|
||||||
@@ -71,9 +62,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Limit clone depth to speed up build
|
# Limit clone depth to speed up build
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 5
|
|
||||||
|
|
||||||
# Install Python runtime and dependencies
|
# Install Python runtime and dependencies
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
@@ -122,17 +111,24 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Limit clone depth to speed up build
|
# Limit clone depth to speed up build
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v2
|
||||||
with:
|
|
||||||
fetch-depth: 5
|
|
||||||
|
|
||||||
# Ensure latest build if repository is not up-to-date
|
# Install Node runtime and dependencies
|
||||||
- run: rm -rf material
|
- uses: actions/setup-node@v1
|
||||||
|
|
||||||
# Download distribution files
|
|
||||||
- uses: actions/download-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: material
|
node-version: 10.x
|
||||||
|
|
||||||
|
- uses: actions/cache@v1
|
||||||
|
id: cache-node
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
|
||||||
|
- if: steps.cache-node.outputs.cache-hit != 'true'
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
# Build distribution files
|
||||||
|
- run: npm run build
|
||||||
|
|
||||||
# Install Python runtime and dependencies
|
# Install Python runtime and dependencies
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
@@ -141,11 +137,11 @@ jobs:
|
|||||||
|
|
||||||
- run: pip install --upgrade setuptools wheel twine
|
- run: pip install --upgrade setuptools wheel twine
|
||||||
|
|
||||||
# Build and test Docker image
|
# # Build and test Docker image
|
||||||
- run: |
|
# - run: |
|
||||||
docker build -t ${GITHUB_REPOSITORY} .
|
# docker build -t ${GITHUB_REPOSITORY} .
|
||||||
docker run --rm -i -v $(pwd):/docs ${GITHUB_REPOSITORY} \
|
# docker run --rm -i -v $(pwd):/docs ${GITHUB_REPOSITORY} \
|
||||||
build --theme material
|
# build --theme material
|
||||||
|
|
||||||
# Build Python package
|
# Build Python package
|
||||||
- run: python setup.py build sdist bdist_wheel --universal
|
- run: python setup.py build sdist bdist_wheel --universal
|
||||||
|
|||||||
Reference in New Issue
Block a user