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-11-18 11:54:26 +00:00

35 lines
686 B
YAML

name: CI
on: ['push', 'pull_request']
jobs:
ci:
runs-on: ubuntu-latest
name: CI
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up PR environment
if: github.event.number != null
run: echo "PULL_REQUEST_ID=${{ github.event.number }}" >> $GITHUB_ENV
- 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.ref == 'refs/heads/master'
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}