2020-01-22 14:00:31 -06:00
|
|
|
name: Deploy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-02-12 04:02:07 -06:00
|
|
|
branches:
|
|
|
|
- master
|
2020-02-12 07:49:08 -06:00
|
|
|
tags:
|
|
|
|
- rust-1.**
|
2020-01-22 14:00:31 -06:00
|
|
|
|
|
|
|
env:
|
|
|
|
TARGET_BRANCH: 'gh-pages'
|
|
|
|
SHA: '${{ github.sha }}'
|
|
|
|
SSH_REPO: 'git@github.com:${{ github.repository }}.git'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2020-02-23 22:38:35 -06:00
|
|
|
if: github.repository == 'rust-lang/rust-clippy'
|
2020-01-22 14:00:31 -06:00
|
|
|
|
|
|
|
steps:
|
2020-02-07 15:24:41 -06:00
|
|
|
# Setup
|
2020-01-22 14:00:31 -06:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2.0.0
|
2020-02-07 15:24:41 -06:00
|
|
|
|
2020-01-22 14:00:31 -06:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2.0.0
|
|
|
|
with:
|
|
|
|
ref: ${{ env.TARGET_BRANCH }}
|
|
|
|
path: 'out'
|
2020-02-07 15:24:41 -06:00
|
|
|
|
|
|
|
# Run
|
2020-02-12 07:49:08 -06:00
|
|
|
- name: Set tag name
|
|
|
|
if: startswith(github.ref, 'refs/tags/')
|
|
|
|
run: |
|
|
|
|
TAG=$(basename ${{ github.ref }})
|
|
|
|
echo "::set-env name=TAG_NAME::$TAG"
|
2020-01-22 14:00:31 -06:00
|
|
|
- name: Deploy
|
|
|
|
run: |
|
|
|
|
eval "$(ssh-agent -s)"
|
|
|
|
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
|
2020-01-26 08:40:53 -06:00
|
|
|
bash .github/deploy.sh
|