]> git.lizzy.rs Git - rust.git/blob - .github/workflows/deploy.yml
Nuke Travis+AppVeyor CI
[rust.git] / .github / workflows / deploy.yml
1 name: Deploy
2
3 on:
4   push:
5     branches:
6       - master
7     tags:
8       - rust-1.**
9
10 env:
11   TARGET_BRANCH: 'gh-pages'
12   SHA: '${{ github.sha }}'
13   SSH_REPO: 'git@github.com:${{ github.repository }}.git'
14
15 jobs:
16   deploy:
17     runs-on: ubuntu-latest
18
19     steps:
20     # Setup
21     - name: Checkout
22       uses: actions/checkout@v2.0.0
23
24     - name: Checkout
25       uses: actions/checkout@v2.0.0
26       with:
27         ref: ${{ env.TARGET_BRANCH }}
28         path: 'out'
29
30     # Run
31     - name: Set tag name
32       if: startswith(github.ref, 'refs/tags/')
33       run: |
34         TAG=$(basename ${{ github.ref }})
35         echo "::set-env name=TAG_NAME::$TAG"
36     - name: Deploy
37       run: |
38         eval "$(ssh-agent -s)"
39         ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
40         bash .github/deploy.sh