pitscher / ovh-deploy-hosting-action

A GitHub Action to deploy the contents of a repository to an OVH Hosting Plan (with SSH support)
GNU General Public License v3.0
15 stars 12 forks source link

How move cod in VM instead from repository ? #1

Closed Rayzen-dev closed 2 years ago

Rayzen-dev commented 2 years ago

Hi, I would like to push code of my project inside VM instead the repository URL. I have this code:

name: Tests
on: [push]
jobs:
  php-unit-and-functional-tests:
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: true
      matrix:
        php-versions: ['8.0']
    steps:
      # —— Setup Github actions
      # https://github.com/actions/checkout (official)
      - name: Git checkout placeholder-service
        uses: actions/checkout@v2
      # https://github.com/shivammathur/setup-php (community)
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          coverage: none
          tools: composer:v2
          extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, dom, filter, gd, iconv, json, mbstring, pdo
        env:
          update: true
      - name: Check PHP Version
        run: php -v
      # —— Composer
      - name: Validate composer.json and composer.lock
        run: composer validate
      - name: Get composer cache directory
        id: composer-cache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
      - name: Cache composer dependencies
        uses: actions/cache@v1
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
          restore-keys: ${{ runner.os }}-composer-
      - name: Install Composer dependencies
        run: composer install
      # —— Symfony
      - name: Check Symfony requirements
        run: vendor/bin/requirements-checker
      - name: Check the Symfony console
        run: php bin/console -V
      # —— Code style —— (Based on this package: https://github.com/OskarStark/php-cs-fixer-ga)
      - name: PHP-CS-Fixer
        uses: docker://oskarstark/php-cs-fixer-ga
        with:
          args: --config=.php-cs-fixer.dist.php --diff --dry-run
      ## —— Tests
      - name: Run functionnal and unit tests
        run: |
          cp .env.ci .env.test
          cp .env.ci .env
          cp phpunit.ci.xml phpunit.xml
          composer test

How can I add or modify the entrypoint for push with this action ?

pitscher commented 2 years ago

Hey @Rayzen-dev, I'm not sure if I got your question right. (You've probably figured it out already) This GitHub action relies on a repository (with the websites code you want to push to an OVH hosting plan). If you take a look at the file "entrypoint.sh" you can see, that ssh is being used to connect to the hosting plan and to perform some operations.

However, your websites code needs to be present in a repository. Other sources than a repository are not yet supported - but might be in a future version.