From 5fc0097021e35e0697cd8926c9d3e9b4a8bb5e88 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Tue, 19 Oct 2021 13:38:53 -0400 Subject: [PATCH] Update publishing GA job --- .github/workflows/publishing.yml | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index 1d40c3c3..24d39b46 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -1,11 +1,9 @@ name: Publishing -#on: -# push: -# tags: -# - '*' - -on: [push, pull_request, workflow_dispatch] +on: + push: + tags: + - '*' jobs: @@ -101,27 +99,29 @@ jobs: - uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + password: ${{ secrets.PYPI_API_TOKEN }} + # For publishing to Test PyPI, uncomment next two lines: + # password: ${{ secrets.TEST_PYPI_API_TOKEN }} + # repository_url: https://test.pypi.org/legacy/ -# publish-docs: -# name: Publish docs -# needs: [publish] -# runs-on: ubuntu-18.04 -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@v2 -# with: -# python-version: "3.10" -# - run: pip install -r requirements-doc.txt -# - run: pip install awscli -# - run: pip install -e . -# - run: (cd docs && make clean html) -# - run: | -# aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete -# aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null -# echo "Cache invalidation triggered" -# env: -# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} -# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} -# AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} + publish-docs: + name: Publish docs + needs: [publish] + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.10" + - run: pip install -r requirements-doc.txt + - run: pip install awscli + - run: pip install -e . + - run: (cd docs && make clean html) + - run: | + aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete + aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null + echo "Cache invalidation triggered" + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}