Coder Social home page Coder Social logo

tsato21 / prod-test-auto-management_2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 13 KB

複数のGoogle Apps Scriptプロジェクトのテスト環境と本番環境を一つのリポジトリで管理し、Github Actionsで本番環境に自動デプロイするワークフロー。

Home Page: https://tsato21.github.io/github-actions/each-action/prod-test-auto-management

JavaScript 100.00%
clasp gas githubaction-workflow

prod-test-auto-management_2's Introduction

prod-test-auto-management_2 (for Google Apps Script Projects)

目次

1 概要

複数のGoogle Apps Scriptプロジェクトのテスト環境と本番環境を一つのリポジトリで管理し、Github Actionsで本番環境に自動デプロイするワークフロー。

2 セットアップ

⭐️ prod-test-auto-management_1のREADMEと異なる部分のみ、記載。

  • ローカルリポジトリの構成を以下の構成に設定する。(prod-test-auto-management_1のREADME >2 セットアップ > 2)

    ./
    ├─ project_1/
    │  └─ src/
    │  │  ├─ appsscript.json
    │  │  └─ Code.gs
    │  └─ .clasp.json
    ├─ project_2/
    │  └─ src/
    │  │  ├─ appsscript.json
    │  │  └─ Code.gs
    │  └─ .clasp.json
    
  • Repository Secretを設定。(prod-test-auto-management_1のREADME > 2 セットアップ > 8)

    • CLASP_SCRIPT_IDは、各プロジェクトごとに記載。(例: RELEASE_PROJECT1_CLASP_SCRIPT_ID)
  • deploy.ymlファイルで各プロジェクト(本番環境)のフォルダ名、IDを以下のように記載。(prod-test-auto-management_1のREADME > 2 セットアップ > 9)

    strategy:
      matrix:
        projects:
          - target-dir: 'project_1'
            script-id-key: 'RELEASE_PROJECT1_CLASP_SCRIPT_ID'
          - target-dir: 'project_2'
            script-id-key: 'RELEASE_PROJECT2_CLASP_SCRIPT_ID'
    
    • matrixを使用して、各プロジェクトごとにjobを走らせる仕様。

3 使用方法

⭐️ prod-test-auto-management_1のREADMEと異なる部分のみ、記載。(XXX)は当該READMEのセクションを示している。

  • 全てのプロジェクトのテスト環境用ファイルを最新の状態にする。(prod-test-auto-management_1のREADME > 3 使用方法 > 1)

    • 各プロジェクト内で作業する際は、cd project_1のように、当該プロジェクトに移動してから作業。
    • 別プロジェクトや、Githubへのpush作業時は、cd ..でrootフォルダに戻る。
  • Commit & タグ付け & Pushで、全てのプロジェクトの本番環境用ファイルが最新の状態 & Versionが更新される。(prod-test-auto-management_1のREADME > 3 使用方法 > 2)

4 参考文献

5 サンプル

prod-test-auto-management_2's People

Contributors

tsato21 avatar ttsukagoshi avatar

Watchers

 avatar

Forkers

ttsukagoshi

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.