Skip to content

Add 1.28 support to matrix #25

Add 1.28 support to matrix

Add 1.28 support to matrix #25

name: Staging Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
env:
CF_API: ${{ secrets.PCFONE_API }}
CF_ORG: ${{ secrets.PCFONE_ORG }}
CF_SPACE: ${{ secrets.PCFONE_SPACE }}
CF_USERNAME: ${{ secrets.PCFONE_BUILDS_USERNAME }}
CF_PASSWORD: ${{ secrets.PCFONE_BUILDS_PASSWORD }}
jobs:
# build and deploy staging
build:
# prevent staging on forks
if: github.repository == 'spring-io/dataflow.spring.io'
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# agent may give node which doesn't work for us
- uses: actions/setup-node@v3
with:
node-version: 18.2.0
# setup cf cli with bg plugin and login
- uses: jvalkeal/setup-cf-cli@v0
with:
version: 6.51.0
plugin-repo: https://plugins.cloudfoundry.org
plugin-id: blue-green-deploy
login: true
# do site build and prepare for cf push
- name: Yarn build
env:
NODE_OPTIONS: '--openssl-legacy-provider'
run: |
yarn install
yarn run fix
yarn build
yarn run prepare-cf-push
# do cf blue/green deploy
- name: CF Staging Deploy
run: cf blue-green-deploy dataflow-website-staging -f manifest-local.yml --smoke-test ./blue-green-smoke.sh --delete-old-apps