Temporarily disabled publish job for branch

This commit is contained in:
squidfunk 2019-12-25 15:14:32 +01:00
parent bad16638c4
commit cee6243172

View File

@ -116,54 +116,54 @@ jobs:
mkdocs gh-deploy --force
mkdocs --version
# Publish Python package and Docker image
publish:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
steps:
# # Publish Python package and Docker image
# publish:
# if: startsWith(github.ref, 'refs/tags')
# needs: build
# runs-on: ubuntu-latest
# steps:
# Limit clone depth to speed up build
- uses: actions/checkout@v1
with:
fetch-depth: 5
# # Limit clone depth to speed up build
# - uses: actions/checkout@v1
# with:
# fetch-depth: 5
# Ensure latest build if repository is not up-to-date
- run: rm -rf material
# # Ensure latest build if repository is not up-to-date
# - run: rm -rf material
# Download distribution files
- uses: actions/download-artifact@v1
with:
name: material
# # Download distribution files
# - uses: actions/download-artifact@v1
# with:
# name: material
# Install Python runtime and dependencies
- uses: actions/setup-python@v1
with:
python-version: 3.x
# # Install Python runtime and dependencies
# - uses: actions/setup-python@v1
# with:
# python-version: 3.x
- run: pip install --upgrade setuptools wheel twine
# - 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
# # Build Python package
# - run: python setup.py build sdist bdist_wheel --universal
# Push release to PyPI
- env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
# # Push release to PyPI
# - env:
# PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
# PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
# Push image to Docker Hub
- env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
docker tag ${GITHUB_REPOSITORY} ${GITHUB_REPOSITORY}:${GITHUB_REF##*/}
docker tag ${GITHUB_REPOSITORY} ${GITHUB_REPOSITORY}:latest
docker push ${GITHUB_REPOSITORY}
# # Push image to Docker Hub
# - env:
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# run: |
# docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}
# docker tag ${GITHUB_REPOSITORY} ${GITHUB_REPOSITORY}:${GITHUB_REF##*/}
# docker tag ${GITHUB_REPOSITORY} ${GITHUB_REPOSITORY}:latest
# docker push ${GITHUB_REPOSITORY}