DEVPROD-8113: Define optional variable before referencing and add sup… #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Python Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Build and publish | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD | |
- name: Build docs | |
working-directory: ./goodbase-docs | |
run: | | |
wget -q https://github.com/gohugoio/hugo/releases/download/v0.92.1/hugo_0.92.1_Linux-64bit.tar.gz | |
tar xf hugo_0.92.1_Linux-64bit.tar.gz | |
cp ../CHANGELOG.md content/project-history | |
./hugo | |
- name: Publish docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
wget -q https://github.com/dbradf/gh-pages-publish/releases/download/v0.2.0/gh-pages-publish-linux | |
chmod +x gh-pages-publish-linux | |
git remote set-url --push origin https://evergreen-ci:[email protected]/evergreen-ci/git-co-evg-base | |
./gh-pages-publish-linux --docs-dir goodbase-docs/public --verbose |