Skip to content

Instantly share code, notes, and snippets.

@forecho
Created March 17, 2020 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forecho/77cad2890f351ade15b007934b0156c3 to your computer and use it in GitHub Desktop.
Save forecho/77cad2890f351ade15b007934b0156c3 to your computer and use it in GitHub Desktop.
GitHub Action 部署示例
name: PHP Composer
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate
- name: Setting composer config
run: composer config -g github-oauth.github.com ${{ secrets.GITHUB_ONLYREAD_TOKEN }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Deploy to Server
uses: yiier/yii2-base-deploy@master
with:
user: ubuntu
host: 152.136.113.161
path: /home/ubuntu/www/test-deploy
owner: ubuntu
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment