name: Compile Phyre NGINX Package

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

permissions:
  contents: read

jobs:
  build:

    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
    - uses: actions/checkout@v3

    - name: Compile NGINX
      run: |
        cd compilators/debian/nginx
        chmod 775 ./nginx-compile.sh
        ./nginx-compile.sh
        ls

    - uses: stefanzweifel/git-auto-commit-action@v5
      with:
        commit_user_name: Cloud Vision Bot
        commit_user_email: bobicloudvision@gmail.com
        commit_author: Cloud Vision Bot <bobicloudvision@gmail.com>
        commit_message: Upload compiled packages [BOT]
        repository: ./compilators/debian/nginx/dist
        #skip_checkout: true
        #push_options: '--force'
        #skip_fetch: true
        #create_branch: true
        # status_options: '--untracked-files=no'
