tldr/.github/workflows/ci.yml

34 lines
641 B
YAML
Raw Normal View History

2020-06-09 11:10:15 +01:00
name: CI
on: ['push', 'pull_request']
jobs:
ci:
runs-on: ubuntu-latest
name: CI
steps:
- name: Checkout
uses: actions/checkout@v2
2020-06-24 13:11:33 +01:00
- name: Set up PR environment
if: github.event.number != null
run: echo "::set-env name=PULL_REQUEST_ID::${{ github.event.number }}"
2020-06-09 11:10:15 +01:00
- name: Install npm dependencies
run: npm ci
- name: Test
run: npm test
- name: Build
run: bash scripts/build.sh
- name: Deploy
2020-06-26 18:09:47 +01:00
if: github.repository == 'tldr-pages/tldr' && github.ref == 'master'
2020-06-24 13:30:09 +01:00
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}