diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b37fb4f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Deploy +on: + push: + branches: [main] + pull_request: + workflow_dispatch: +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: checkout code + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 15.0.1 + - name: Install dependencies + run: | + cd cookbook + set -v + pwd + npm install + npm gatsby --version + npm run build + echo Site built and ready to deploy! + - name: Deploy to Github packages + # only deploy when pushing to main + if: ${{(github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.ref_name == 'main'}} + run: | + cd cookbook/public + git config --global init.defaultBranch main + pwd + set -v + git init + git config user.name ${{ github.actor }} + git config user.email ${{ github.actor }}@users.noreply.github.com + git add . + echo 'Add completed'. + git commit -m "Deploy commit: ${{ github.sha }}" + echo 'Commit completed.' + git push -f https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git main:gh-pages + echo 'Finished deploying the site.' diff --git a/README.md b/README.md index 18187c7..4d6a944 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ A collection of front-end tools and libraries that can be used to extend UIM with JavaScript components. It enables rapid development of SPM custom application pages based on the IBM Carbon Design System. -The documentation is available at this URL: [https://ibm.github.io/spm-ui-addon-devenv/](https://ibm.github.io/spm-ui-addon-devenv/) +The documentation is available at this URL: [https://merative.github.io/spm-ui-addon-devenv/](https://merative.github.io/spm-ui-addon-devenv/) diff --git a/cookbook/gatsby-config.js b/cookbook/gatsby-config.js index 1f40404..e6409c8 100644 --- a/cookbook/gatsby-config.js +++ b/cookbook/gatsby-config.js @@ -1,6 +1,6 @@ const siteTitle = 'Merative SPM UI Addon Development Environment' -var sitePrefix = process.env.SITE_PREFIX || "/" +var sitePrefix = process.env.SITE_PREFIX || "/spm-ui-addon-devenv" console.log(`Using SITE_PREFIX: '${sitePrefix}'`) module.exports = { diff --git a/cookbook/src/pages/disclaimer.mdx b/cookbook/src/pages/disclaimer.mdx index d407784..11015dd 100644 --- a/cookbook/src/pages/disclaimer.mdx +++ b/cookbook/src/pages/disclaimer.mdx @@ -6,6 +6,7 @@ description: Disclaimer This cookbook is current as of the initial date of publication and may be changed by Merative at any time. THE INFORMATION IN THIS COOKBOOK IS PROVIDED “AS IS” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING WITHOUT ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT. + Merative products are warranted according to the terms and conditions of the agreements under which they are provided. This cookbook is intended for general guidance only. It is not intended to be a substitute for detailed research or the exercise of professional judgment. diff --git a/cookbook/src/pages/prerequisites.mdx b/cookbook/src/pages/prerequisites.mdx index 76cbc9a..237f9b3 100644 --- a/cookbook/src/pages/prerequisites.mdx +++ b/cookbook/src/pages/prerequisites.mdx @@ -21,8 +21,8 @@ Node.js is a prerequisite for installing the Merative Social Program Managment U ## Integrated Development Environment (IDE) -The SPM UI Addons Development Environment does not depend on a specific IDE, you can choose your own. There are many IDEs that you can choose, such as Microsoft® Visual Studio Code, Atom, or Sublime Text. -However, we use Microsoft Visual Studio Code to develop Carbon components and addons for Social Program Managment, it supports many plugins that make development faster and easier, for example it supports the following tools: +The SPM UI Addons Development Environment does not depend on a specific IDE, you can choose your own. There are many IDEs that you can choose, such as Microsoft Visual Studio Code, Atom, or Sublime. +However, Merative uses Microsoft Visual Studio Code to develop Social Program Managment UI Addons, it supports many plugins that make development faster and easier, for example it supports the following tools: * Linting tools (ESLint) * Code formatters (Prettier)