Skip to content

Production deployment #131

Production deployment

Production deployment #131

name: "Production deployment"
on: [workflow_dispatch]
jobs:
deploy_production:
if: github.ref == 'refs/heads/production'
runs-on: ubuntu-latest
strategy:
max-parallel: 1
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
- uses: actions/setup-node@v2-beta
with:
node-version: "16"
- name: "Deploy production"
env:
name: production
url: "https://www.queens-awards-enterprise.service.gov.uk/"
CF_ENDPOINT: "api.london.cloud.service.gov.uk"
CF_SPACE: production
CF_APP: qae-production
CF_USER: ${{ secrets.CF_USER }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_ORG: ${{ secrets.CF_ORG }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&source=github'
sudo dpkg -i cf-cli_amd64.deb
cf -v
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
cf install-plugin blue-green-deploy -r CF-Community -f
./bin/deploy