Update main with develop (#1301) #2
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: CD (platform.sh) | |
on: | |
# release: | |
# types: | |
# - published # This would be preferred | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
# Host config | |
- '.plaform/**' | |
- '.platform.app.yaml' | |
- 'gunicorn.conf.py' | |
# Python config | |
- 'poetry.lock' | |
- 'pyproject.toml' | |
# NPM config | |
- 'package.json' | |
- 'package-lock.json' | |
- 'webpack.config.js' | |
# App changes | |
- 'config/**' | |
- 'sass/**' | |
- 'scripts/**' | |
- 'templates/**' | |
- 'etna/**' | |
jobs: | |
ci: | |
name: CI | |
uses: ./.github/workflows/_tests.yml | |
with: | |
python-version: ${{ vars.CI_PYTHON_VERSION }} | |
poetry-version: ${{ vars.CI_POETRY_VERSION }} | |
deploy: | |
runs-on: ubuntu-latest | |
needs: ci | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: axelerant/platformsh-deploy-action@v1 | |
with: | |
project-id: ${{ secrets.PLATFORM_PROJECT_ID }} | |
cli-token: ${{ secrets.PLATFORM_CLI_TOKEN }} | |
ssh-private-key: ${{ secrets.PLATFORM_SSH_KEY }} | |
force-push: true | |
notify-slack: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_TITLE: "A deployment to ${{ github.head_ref || github.ref_name }} is complete" |