Skip to content

Commit

Permalink
ci: fix cd
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand committed Nov 9, 2023
1 parent f81e426 commit 4066d04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Continuous Deployment
on:
release:
types: [published]
workflow_dispatch:

jobs:

Expand All @@ -10,7 +11,6 @@ jobs:
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v4

Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
with:
image: "ghcr.io/artefactory/nlpretext:${{ steps.tag.outputs.tag_name }}"
acs-report-enable: true

- name: upload Anchore scan SARIF report
uses: github/codeql-action/upload-sarif@v1
with:
Expand All @@ -65,6 +66,7 @@ jobs:

- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -87,19 +89,18 @@ jobs:
- name: Install dependencies
run: |
poetry install -E torch
poetry install -E torch -E dask
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
# - name: Publish to PyPI
# env:
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
# run: |
# poetry config pypi-token.pypi $PYPI_TOKEN
# poetry publish --build

- name: Run build script for Sphinx pages
run: |
source $(poetry env info | grep Path | awk '{ print $2 }')/bin/activate
git config --global user.name "Github-Pages Bot"
git config --global user.email "[email protected]"
sh docs/scripts/buildsite.sh
poetry run git config --global user.name "Github-Pages Bot"
poetry run git config --global user.email "[email protected]"
poetry run sh docs/scripts/buildsite.sh
shell: bash
9 changes: 3 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ RUN mkdir -p /home/docker_user/workspace
WORKDIR /home/docker_user/workspace

# Install Poetry
RUN curl -sSL -o install-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py \
&& echo 'daad01ac0c1636f1c0154575c6b3b37a0867e9cedd67d1224fc4259c07b03a86 install-poetry.py' | sha256sum --check \
&& POETRY_HOME=/home/docker_user/poetry python install-poetry.py \
&& rm install-poetry.py
RUN curl -sSL https://install.python-poetry.org | python3 -

ENV PATH="${PATH}:/home/docker_user/.poetry/bin:/home/docker_user/poetry/bin"

COPY pyproject.toml ./
COPY poetry.lock ./

RUN poetry install --no-root --no-dev
RUN poetry lock
RUN poetry install --no-root --no-dev --no-interaction

COPY . /home/docker_user/workspace/

Expand Down

0 comments on commit 4066d04

Please sign in to comment.