Skip to content

Instantly share code, notes, and snippets.

@davidmerrick
Last active October 24, 2019 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidmerrick/15ec0d6cd8e6b25113aa16dd02cb8ea9 to your computer and use it in GitHub Desktop.
Save davidmerrick/15ec0d6cd8e6b25113aa16dd02cb8ea9 to your computer and use it in GitHub Desktop.
GitHub Actions Cheat Sheet

GitHub Actions Cheat Sheet

Actions

Restrict action to just changes to the "public" path:

on: 
  push:
    paths:
    - 'public/*'

Trigger only on PR close:

on: 
  pull_request:
    types: [closed]

Jobs

Steps

A step with a single command:

- name: Install Dependencies
  run: npm install

A step with a multiple commands:

- name: Clean install dependencies and build
  run: | 
    npm ci
    npm run build

Invoke an action

steps:
- uses: jakejarvis/s3-sync-action@master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment