Skip to content

Auto deploy to CF

Auto deploy to CF #38

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install NPM dependencies
run: npm ci
- name: Build
run: npm run build
- name: ESLint
run: npm run lint:ci
- name: Prettier
run: npm run prettier:ci
- name: Test
run: npm run test:ci
- uses: actions/upload-artifact@v4
with:
name: app-build
path: |
./dist
./package*.json
Deploy:
needs: [Build]
runs-on: ubuntu-latest
if: |
always() &&
!contains(needs.*.result, 'cancelled') &&
!contains(needs.*.result, 'failure')
# if: |
# always() &&
# !contains(needs.*.result, 'cancelled') &&
# !contains(needs.*.result, 'failure') &&
# github.ref == 'refs/heads/main'
container: cloudfoundry/cli:latest
steps:
- name: Download pre-built app artifact
uses: actions/download-artifact@v4
with:
name: app-build
# - uses: actions/setup-node@v4
# with:
# node-version: 22
# cache: npm
- name: Test CF
run: |
pwd
ls -la
cf --help