Skip to content

teamnovu/vapor-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Vapor Action

GitHub Release License

GitHub Actions for Laravel Vapor. Base on Docker official Composer image, and installed hirak/prestissimo and laravel/vapor-cli package.

Usage

Via GitHub Workflow

Prepare

  1. Generate a Vapor API Token under https://vapor.laravel.com/app/account/api-tokens
  2. Add both as secret variables to your project under https://github.com/{username}/{project}/settings/secrets

Private Github Repositories

The GITHUB_SECRET variable is used to access any private repos from your github profile.

Generate a Github Token under https://github.com/settings/tokens/new?scopes=repo&description=Github%20Action

You need to define private repositories in your composer.json with the following URL format

"repositories": [
    {
        "type": "git",
        "url": "[email protected]:{username}/{project}.git"
    }
]

Example Github Action

Add a new workflow under .github/workflows (e.g. push.yaml) to your repository to enable this Action.

You can find out more about under https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobs

name: Deploy to staging
on:
  push:
    branches:
        - develop
jobs:
  vapor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Deploy to staging
        env:
            VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
            GITHUB_SECRET: ${{ secrets.GITHUB_SECRET }}
        uses: teamnovu/vapor-action@master
        with:
            args: deploy staging

Credits

License

The MIT License (MIT). Please see License File for more information.