1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00
tldr/.github/workflows/ci.yml
2020-06-26 18:55:59 +02:00

33 lines
644 B
YAML

name: CI
on: ['push', 'pull_request']
jobs:
ci:
runs-on: ubuntu-latest
name: CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PR environment
if: github.event.number != null
run: echo "::set-env name=PULL_REQUEST_ID::${{ github.event.number }}"
- name: Install npm dependencies
run: npm ci
- name: Test
run: npm test
- name: Build
run: bash scripts/build.sh
- name: Deploy
if: github.repository == 'tldr-pages/tldr' && github.branch == 'master'
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}