npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-actions-serverless-pipeline

v0.0.6

Published

A serverless pipeline for GitHub Actions

Downloads

500

Readme

GitHub Actions Serverless CI/CD Pipeline Setup

A simple GitHub actions serverless pipeline setup for a simple serverless function.

Installation

  • Run npm install github-actions-serverless-pipeline into your app and then follow the steps.

Dependency

  1. This package expects that all the build procedures or commands are written in a single Makefile file and that the Makefile is located in the root of the project.
  2. A sample file is attached to this package, and you can use it as a template.

Post Installation Steps

  1. Open your github-actions-setup.yml from .github/workflows/ directory.
  2. Since this is a hidden folder, make sure it is visible in your editor or file explorer.
  3. Replace the following :
    name: github-actions-setup
    with
    name: <your-unique-github-actions-setup-name>
  4. Replace the following :
    branches: [ master ]
    with
    branches: [ <your-branch-name> ]
  5. That's it! Push the changes to your branch, and you are ready to go.

How to read github-actions-setup.yml file?

Check your github-actions-setup.yml file in .github/workflows/ directory to understand what all steps you need to set up.

Imgur

Make sure you have added AWS secrets to your specific repository or organization.

Imgur

Make sure you have a make file in your project root directory which has all the commands to build your project.

Imgur

Comment / Uncomment the following snippet if you don't need to install PHP or customize it as per your need. Use this to install any language or package you need.

Imgur

Comment / Uncomment the following snippet if you don't need any Laravel Mix package to build production assets.

Imgur

This section sets up the node environment for you to run npm commands.

Imgur

This step allows you to read files at your root directory or local directory such as we use make file

Imgur

Private package repository in GitHub Actions

  1. Generate a new SSH key with sufficient access privileges. For security reasons, don't use your personal SSH key but set up a dedicated one for use in GitHub Actions. See below for a few hints if you are unsure about this step.
  2. Make sure you don't have a passphrase set on the private key.
  3. Add the public SSH key to the private repository you are pulling from during the Github Action as a 'Deploy Key'.
  4. Add the private SSH key to the repository triggering the Github Action:
  5. In your repository, go to the Settings > Secrets menu and create a new secret. In this example, we'll call it SSH_PRIVATE_KEY.
  6. Put the contents of the private SSH key file into the contents field.
  7. This key should start with -----BEGIN ... PRIVATE KEY-----, consist of many lines and ends with -----END ... PRIVATE KEY-----.
  8. In your workflow definition file, add the following step. Preferably this would be rather on top, near the actions/checkout@v2 line.

Imgur

Customization

You can easily customize the deployment process by adding your own commands to the Makefile file.

Author

Sagar Chauhan works as a Project Manager - Technology at Greenhonchos. In his spare time, he hunts bug as a Bug Bounty Hunter. Follow him at Instagram, Twitter, Facebook, Github

License

MIT