rollthecloudinc / quell

Climate aware CMS breaking web apps free from carbon emissions.
https://demo.carbonfreed.app/pages/create-panel-page
GNU General Public License v3.0
14 stars 1 forks source link

Continuous Deployment of SOLIDS #369

Open ng-druid opened 12 months ago

ng-druid commented 12 months ago

Summary

Create reusable workflow for continuous deployment of SOLIDS to dev and prod build repos using versioning.

Workflow Files

Dependent Actions

Push Action:

This action has a target-directory option that be used to replace a specific directory rather than the entire code base under the branch. This will be used to target the version number ie. 16.0.0-alpha.6

Build

Dev

npm run  build:plugin:dev:16.0.0-alpha.6

Prod

npm run  build:plugin:prod:16.0.0-alpha.6

Where 16.0.0-alpha.6 is extracted from package.json file using jq

Push

      - name: Push to build repo
        uses: cpina/github-action-push-to-another-repository@main
        env:
          SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
        with:
          source-directory: 'dist/plugin'
          destination-github-username: ${{ secrets.DESTINATION_USER }}
          destination-repository-name: ${{ secrets.DESTINATION_REPO }}
          target-branch: ${{ secrets.TARGET_BRANCH }}
           target-directory: ${{ PACKAGE_VERSION }}

Secrets

Org Secrets:

Environment Secrets:

Repository Secrets:

NOTE: Look into using variables for things that don't need to be encrypted like branch name, repo, user, etc.

Important

Deal with CRITICAL deprecation.

The set-output command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/