diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index a78d0e28..00000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: reusable deployment workflow - -on: - workflow_call: - secrets: - DASH_SSH_KEY: - required: true - DASH_ENTERPRISE_URL: - required: true - APP_NAME: - required: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "deploy" - deploy: - # The type of runner that the job will run on - runs-on: ubuntu-22.04 - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Add git remote - run: git remote add plotly git@$DASH_ENTERPRISE_URL:$APP_NAME - env: - DASH_ENTERPRISE_URL: ${{secrets.DASH_ENTERPRISE_URL}} - APP_NAME: ${{secrets.APP_NAME}} - - name: Setup project directory - run: | - set -x - pwd - ls -al - mkdir -p /home/runner/.ssh - - name: Setup SSH key - run: | - echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa # permissioning - eval "$(ssh-agent -s)" # setting ssh environment variable - ssh-add ~/.ssh/id_rsa - echo "Host * - Port 22 - StrictHostKeyChecking no - UserKnownHostsFile=/dev/null" > ~/.ssh/config - env: - SSH_PRIVATE_KEY: ${{secrets.DASH_SSH_KEY}} - - name: Deploy - run: | - git push --force plotly HEAD:refs/heads/master diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml deleted file mode 100644 index cee2f924..00000000 --- a/.github/workflows/prod-deploy.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: production deployment - -on: - push: - branches: [main] - -jobs: - prod-deploy: - uses: ./.github/workflows/deploy.yml - secrets: - DASH_SSH_KEY: ${{secrets.DASH_SSH_KEY}} - APP_NAME: ${{secrets.APP_NAME}} - DASH_ENTERPRISE_URL: ${{secrets.DASH_ENTERPRISE_URL}} \ No newline at end of file diff --git a/.github/workflows/staging-deploy.yml b/.github/workflows/staging-deploy.yml deleted file mode 100644 index d2075ddd..00000000 --- a/.github/workflows/staging-deploy.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: staging deployment - -on: pull_request - -jobs: - test-and-lint: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python 3.9.16 - uses: actions/setup-python@v3 - with: - python-version: '3.9.16' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Run isort - uses: isort/isort-action@master - - name: Test formatting with black - run: | - black . --check - - name: Run pytest - run: | - python -m pytest - staging-deploy: - needs: test-and-lint - uses: ./.github/workflows/deploy.yml - secrets: - DASH_SSH_KEY: ${{secrets.DASH_SSH_KEY}} - APP_NAME: ${{secrets.APP_NAME}}-staging - DASH_ENTERPRISE_URL: ${{secrets.DASH_ENTERPRISE_URL}} - comment-deploy-link: - needs: staging-deploy - runs-on: ubuntu-22.04 - steps: - - name: Check for existing comment - uses: peter-evans/find-comment@v1 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - - name: Post comment - if: steps.fc.outputs.comment-id == '' - uses: peter-evans/create-or-update-comment@v1 - with: - issue-number: ${{ github.event.pull_request.number }} - body: | - Staging application has been deployed and is available at: https://${{secrets.DASH_ENTERPRISE_URL}}/${{secrets.APP_NAME}}-staging - Production app name: `${{secrets.APP_NAME}}` - Current branch name: `${{github.head_ref}}` - Commit: ${{github.sha}} - - name: Update comment - if: steps.fc.outputs.comment-id != '' - uses: peter-evans/create-or-update-comment@v1 - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - edit-mode: replace - body: | - Staging application has been deployed and is available at: https://${{secrets.DASH_ENTERPRISE_URL}}/${{secrets.APP_NAME}}-staging - Production app name: `${{secrets.APP_NAME}}` - Current branch name: `${{github.head_ref}}` - Commit: ${{github.sha}} diff --git a/Procfile b/Procfile deleted file mode 100644 index 49d1d8ea..00000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: gunicorn app:server --workers 4 --preload \ No newline at end of file