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:
parent
584eac86ee
commit
bd03ca5dfb
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -32,9 +32,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
# Limit clone depth to speed up build
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 5
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Install Node runtime and dependencies
|
||||
- uses: actions/setup-node@v1
|
||||
@ -57,13 +55,6 @@ jobs:
|
||||
# Check diff after build
|
||||
- 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
|
||||
deploy:
|
||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
|
||||
@ -71,9 +62,7 @@ jobs:
|
||||
steps:
|
||||
|
||||
# Limit clone depth to speed up build
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 5
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Install Python runtime and dependencies
|
||||
- uses: actions/setup-python@v1
|
||||
@ -122,17 +111,24 @@ jobs:
|
||||
steps:
|
||||
|
||||
# Limit clone depth to speed up build
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 5
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# Ensure latest build if repository is not up-to-date
|
||||
- run: rm -rf material
|
||||
|
||||
# Download distribution files
|
||||
- uses: actions/download-artifact@v1
|
||||
# Install Node runtime and dependencies
|
||||
- uses: actions/setup-node@v1
|
||||
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
|
||||
- uses: actions/setup-python@v1
|
||||
@ -141,11 +137,11 @@ jobs:
|
||||
|
||||
- run: pip install --upgrade setuptools wheel twine
|
||||
|
||||
# Build and test Docker image
|
||||
- run: |
|
||||
docker build -t ${GITHUB_REPOSITORY} .
|
||||
docker run --rm -i -v $(pwd):/docs ${GITHUB_REPOSITORY} \
|
||||
build --theme material
|
||||
# # Build and test Docker image
|
||||
# - run: |
|
||||
# docker build -t ${GITHUB_REPOSITORY} .
|
||||
# docker run --rm -i -v $(pwd):/docs ${GITHUB_REPOSITORY} \
|
||||
# build --theme material
|
||||
|
||||
# Build Python package
|
||||
- run: python setup.py build sdist bdist_wheel --universal
|
||||
|
Loading…
Reference in New Issue
Block a user