name: "Build and Deploy"
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm i
    - run: npm run build --if-present
    - name: "Predeploy"
      if: github.ref == 'refs/heads/main'
      run: npm run predeploy
    - name: "Deploy with Swift"
      if: github.ref == 'refs/heads/main'
      env: # Set the secret as an input
        OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
        OS_USERNAME: ${{ secrets.OS_USERNAME }}
        OS_TENANT_ID: ${{ secrets.OS_TENANT_ID }}
        OS_TENANT_NAME: ${{ secrets.OS_TENANT_NAME }}
      run: npm run deploy

name: "Build and Deploy"
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm i
    - run: npm run build --if-present
    - name: "Deploy with Swift"
      if: github.ref == 'refs/heads/main'
      env: # Set the secret as an input
        OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
        OS_USERNAME: ${{ secrets.OS_USERNAME }}
        OS_TENANT_ID: ${{ secrets.OS_TENANT_ID }}
        OS_TENANT_NAME: ${{ secrets.OS_TENANT_NAME }}
      run: npm run deploy

Remove predeploy task from github actions
Remove predeploy task from github actions
