Created
March 17, 2020 07:45
-
-
Save forecho/77cad2890f351ade15b007934b0156c3 to your computer and use it in GitHub Desktop.
GitHub Action 部署示例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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