Giter VIP home page Giter VIP logo

deploydemo's Introduction

Deploy Demo

A simple example showing multi-stage deployments using GitHub Actions.

Just an example

The testing and deployment logic present in script/test and script/deploy are merely illustrative and need to be modified to do anything meaningful.

This example uses the master branch to deploy staging and a production branch to deploy production. These conventions can be changed to use any refs you'd like; just change the on settings in .github/workflows/deploy-*.yml.

Various repository settings (specifically those related to branch protection and status check enforcement) should be set as well; some suggestions are made below.

Development Flow

Create a topic branch:

$ git checkout -b change-abc

Make your changes...

Then, commit and push:

$ git commit -m "Changed ABC"
$ git push --set-upstream origin change-abc

On GitHub, create a pull request.

⚙️ The CI workflow will run. (Tip: In your repo, set Require status checks to pass before merging for ci on your master branch by visiting Settings ➡️ Branches ➡️ Add rule to prevent non-passing PRs from being merged.)

When CI passes (and your code is ready, reviewed, etc), merge the PR.

⚙️ The Deploy to Staging workflow will run. Note that this workflow will also run the tests to ensure they pass post-merge before deploying.

Once deployed to staging, after any and all manual testing is complete, promote staging to production by merging your changes from master into the production branch. One way to do this is by a specific deployment branch:

# While on the 'master' branch; just pushing this to an alias
$ git push origin master:change-abc-deploy

Then submitting a pull request to merge change-abc-deploy into production.

⚙️ The CI workflow will run. (Tip: In your repo, set Require status checks to pass before merging for ci on your production branch by visiting Settings ➡️ Branches ➡️ Add rule to prevent non-passing PRs from being merged.)

When 100% ready, merge the pull request.

⚙️ The Deploy to Production workflow will run. Note that this workflow will also run the tests to ensure they pass post-merge before deploying.

deploydemo's People

Contributors

bruce 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.