GitHub Actions for Laravel Vapor. Base on Docker official Composer image, and installed hirak/prestissimo and laravel/vapor-cli package.
Via GitHub Workflow
- Generate a Vapor API Token under https://vapor.laravel.com/app/account/api-tokens
- Add both as secret variables to your project under https://github.com/{username}/{project}/settings/secrets
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"
}
]
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
The MIT License (MIT). Please see License File for more information.