Skip to content

Instantly share code, notes, and snippets.

@tcmorris
Created August 20, 2020 16:00
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 tcmorris/a779e0c62f9db194b7a15bdef0ec696e to your computer and use it in GitHub Desktop.
Save tcmorris/a779e0c62f9db194b7a15bdef0ec696e to your computer and use it in GitHub Desktop.
Example GitHub Action for building with node.js
name: Build node.js
on: [push]
env:
NODE_VERSION: '10.x'
jobs:
build-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup Node
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
# Run npm build
- name: npm install, build
run: |
npm install
npm run build
# Do something with assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment