Dev deployment #114
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: "Dev deployment" | |
on: [workflow_dispatch] | |
jobs: | |
deploy_dev: | |
runs-on: ubuntu-20.04 | |
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: Read Ruby version | |
id: ruby-version | |
run: echo "ruby-version=$(cat .ruby-version)" >> $GITHUB_ENV | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ env.ruby-version }} | |
- uses: actions/setup-node@v2-beta | |
with: | |
node-version: "16" | |
- name: "Deploy dev" | |
env: | |
name: dev | |
url: "https://dev.queens-awards-enterprise.service.gov.uk/" | |
CF_ENDPOINT: "api.london.cloud.service.gov.uk" | |
CF_SPACE: dev | |
CF_APP: qae-dev | |
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: | | |
npm install -g yarn | |
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - | |
echo "deb [trusted=yes] https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list | |
sudo apt-get update | |
sudo apt-get install cf7-cli | |
cf -v | |
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org | |
cf install-plugin blue-green-deploy -r CF-Community -f | |
./bin/deploy |