Giter Site home page Giter Site logo

semaphoreci-demos / semaphore-demo-static-website Goto Github PK

View Code? Open in Web Editor NEW
4.0 6.0 13.0 14.61 MB

A demo CI/CD pipeline for a static website with Semaphore and AWS S3 or Netlify.

Home Page: https://docs.semaphoreci.com/article/97-continuous-deployment-static-website

License: MIT License

JavaScript 100.00%
static-site gatsbyjs semaphoreci cicd s3 netlify continuous-integration continuous-deployment nightwatchjs

semaphore-demo-static-website's Introduction

Semaphore demo CI/CD pipeline using Gatsby.js

Example application and CI/CD pipeline showing how to deploy a static website to S3 and Netlify on Semaphore 2.0.

In this demo we're using Gatsby.js blog. We're starting from the Gatsby starter blog template.

CI/CD on Semaphore

Fork this repository and use it to create a project.

Populate each secret as shown in ./.semaphore/secrets/*.sample.yml

The CI pipeline will look like this:

CI pipeline on Semaphore

The example pipeline contains 2 blocks and 2 promotions:

  • Install Dependencies
    • installs and caches all npm dependencies.
  • Build site
    • Runs npm build.
    • Stores website files of "public" in cache.

If all steps are ok, we move to the deployment pipelines. It consists of two promotions:

  • Deploy to S3:
    • Deploys website files to S3 bucket which is specified in secret.
  • Deploy to Netlify
    • Deploys website files to Netlify site.

Local project setup

npm install
npm run start
npm run nightwatch

Related links

For a full step-by-step guide, read the article on dev.to.

License

Copyright (c) 2019 Rendered Text

Distributed under the MIT License. See the file LICENSE.md.

semaphore-demo-static-website's People

Contributors

commanderk5 avatar csidyel avatar markoa avatar rehabhassanein avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.