From 956e4c5f211ea597c74d64703ba867dbc36687c0 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 10:25:07 +0100 Subject: [PATCH 01/21] fix broken links in quickstart --- content/doc/quickstart/_index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/doc/quickstart/_index.md b/content/doc/quickstart/_index.md index 44c2eed3..0500c011 100644 --- a/content/doc/quickstart/_index.md +++ b/content/doc/quickstart/_index.md @@ -133,7 +133,7 @@ Enter the name and the description of your application. {{< tab >}} *To deploy via Git, you need it installed on your machine. You can find more information on Git website: [git-scm.com](https://git-scm.com)* - *Note:* During the deployment, the .git folder is automatically deleted to avoid security problems. If you need to know which version is used on the server please use the `COMMIT_ID` [environment variable](content/doc/reference/reference-environment-variables). + *Note:* During the deployment, the .git folder is automatically deleted to avoid security problems. If you need to know which version is used on the server please use the `COMMIT_ID` [environment variable](/doc/reference/reference-environment-variables). Follow these steps to deploy your application: @@ -202,9 +202,9 @@ If the remote asks you for a password right after a git push attempt, this may b **Add your SSH key to your profile here:** -https://console.clever-cloud.com/users/me/ssh-keys">https://console.clever-cloud.com/users/me/ssh-keys +https://console.clever-cloud.com/users/me/ssh-keys" > https://console.clever-cloud.com/users/me/ssh-keys -The full tutorial about adding SSH key is here: [Adding SSH keys](/account/ssh-keys-managment) +The full tutorial about adding SSH key is here: [Adding SSH keys](/doc/account/ssh-keys-management) {{% /details %}} @@ -287,7 +287,7 @@ Clever Cloud provides multiple add-ons to work with your applications: 3. Click on **Add an add-on**. This space let you create and configure the add-on according to your needs. 4. Choose which *type* of add-on you want to create. See above the list of available add-ons and their corresponding documentation pages for further information on how they work. 5. Select the plan you need for you add-on. You can find details about the pricing, the capacity of the add-on and other specifications on this page or in the corresponding documentation page. - 6. Choose with which application you want to link you add-on. Linking an add-on to an application will provide configuration to the application through [environment variables](doc/develop/env-variables.md"). The environment variables provided by the add-on are available for use in the linked application. If you want to use your add-on alone, just don't link it to any application. + 6. Choose with which application you want to link you add-on. Linking an add-on to an application will provide configuration to the application through [environment variables](/doc/develop/env-variables). The environment variables provided by the add-on are available for use in the linked application. If you want to use your add-on alone, just don't link it to any application. 7. Choose the name of the add-on and the region where the add-on will be hosted. 8. Click on the **Create** button. From 939d84b18ed9c1c2cff5c501a74c3e664e128b5e Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 12:12:02 +0100 Subject: [PATCH 02/21] fix pgpool path on card --- content/guides/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/_index.md b/content/guides/_index.md index 907237f7..93347f24 100644 --- a/content/guides/_index.md +++ b/content/guides/_index.md @@ -62,5 +62,5 @@ comments: false {{< cards >}} {{< card link="/guides/kibana" title="Customize Kibana" subtitle= "Deploy and customize a Kibana server on Clever Cloud" icon="kibana" >}} {{< card link="/guides/pgpool" title="Pgpool-II" subtitle= "How to configure and use Pgpool-II for PostgreSQL add-ons" icon="pg" >}} - {{< card link="/guides/mysql/pgpool" title="ProxySQL" subtitle= "Configure and use ProxySQL for MySQL add-ons" icon="mysql" >}} + {{< card link="/guides/pgpool" title="ProxySQL" subtitle= "Configure and use ProxySQL for MySQL add-ons" icon="mysql" >}} {{< /cards >}} \ No newline at end of file From b2a4c98a9c31ca51bac3f3a615674aadfdddb2a5 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 12:14:19 +0100 Subject: [PATCH 03/21] update readme: running instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b5d600f..7004b6bd 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ Follox these instructions to contibute to the doc. ### Run locally 1. Clone this repo -2. Go to the repo root `cd clever-documentation-2024` -3. Start the theme module: `hugo mod get github.com/imfing/hextra` +2. Go to the repo root `cd documentation` +3. Start the theme module: `hugo mod get github.com/imfing/hextra` (optional, might be needed to update the theme if you encounter errors in step 4) 4. Run `hugo server` Local site is displayed on http://localhost:1313 From a9567758a27773b94d4bfcb2e4e95f0c79db329a Mon Sep 17 00:00:00 2001 From: Julia March <101819212+juliamrch@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:50:45 +0100 Subject: [PATCH 04/21] Update README.md Update git clone commands and specify why initiating module might be required --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7004b6bd..f6977f8c 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ Follox these instructions to contibute to the doc. ### Run locally -1. Clone this repo +1. Clone this repo: `git clone git@github.com:CleverCloud/documentation.git` 2. Go to the repo root `cd documentation` -3. Start the theme module: `hugo mod get github.com/imfing/hextra` (optional, might be needed to update the theme if you encounter errors in step 4) +3. Start the theme module: `hugo mod get github.com/imfing/hextra` (optional, but do it if you encounter an error on step 4,to update the theme) 4. Run `hugo server` Local site is displayed on http://localhost:1313 From 4c0484f8a539ab4ea1b636cc6c1a2233ebbeda4b Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 12:14:19 +0100 Subject: [PATCH 05/21] update readme: running instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6977f8c..7004b6bd 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ Follox these instructions to contibute to the doc. ### Run locally -1. Clone this repo: `git clone git@github.com:CleverCloud/documentation.git` +1. Clone this repo 2. Go to the repo root `cd documentation` -3. Start the theme module: `hugo mod get github.com/imfing/hextra` (optional, but do it if you encounter an error on step 4,to update the theme) +3. Start the theme module: `hugo mod get github.com/imfing/hextra` (optional, might be needed to update the theme if you encounter errors in step 4) 4. Run `hugo server` Local site is displayed on http://localhost:1313 From e75afcff22ce172aa6d577234634d079bfa0975d Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 13:14:40 +0100 Subject: [PATCH 06/21] fix proxysql path on guides card --- content/guides/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/_index.md b/content/guides/_index.md index 93347f24..de6e02a3 100644 --- a/content/guides/_index.md +++ b/content/guides/_index.md @@ -62,5 +62,5 @@ comments: false {{< cards >}} {{< card link="/guides/kibana" title="Customize Kibana" subtitle= "Deploy and customize a Kibana server on Clever Cloud" icon="kibana" >}} {{< card link="/guides/pgpool" title="Pgpool-II" subtitle= "How to configure and use Pgpool-II for PostgreSQL add-ons" icon="pg" >}} - {{< card link="/guides/pgpool" title="ProxySQL" subtitle= "Configure and use ProxySQL for MySQL add-ons" icon="mysql" >}} + {{< card link="/guides/proxysql" title="ProxySQL" subtitle= "Configure and use ProxySQL for MySQL add-ons" icon="mysql" >}} {{< /cards >}} \ No newline at end of file From 86982a41225a556377e45f0b5a07e4b87feff479 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 13:44:20 +0100 Subject: [PATCH 07/21] update Readme with fixed name for github repo when cloning --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7004b6bd..dd402893 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ This is a Hugo project with a theme called "Hextra" added a module..

- [Reference Environnement Variables](https://developers.clever-cloud.com/doc/reference/reference-environment-variables/) - [Guides and Tutorials](https://developers.clever-cloud.com/guides/) - ## Features - **Beautiful Design** - Inspired by Nextra, Hextra utilizes Tailwind CSS to offer a modern design that makes your site look outstanding. From d88b2b656de294c12cedd265fd6a624d0ca49ce2 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 15:06:37 +0100 Subject: [PATCH 08/21] add test script files --- .../workflows/review-app.yml.nope | 40 +++++++++++++++++++ .github/ISSUE_TEMPLATE/workflows/test-cli.yml | 27 +++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/workflows/review-app.yml.nope create mode 100644 .github/ISSUE_TEMPLATE/workflows/test-cli.yml diff --git a/.github/ISSUE_TEMPLATE/workflows/review-app.yml.nope b/.github/ISSUE_TEMPLATE/workflows/review-app.yml.nope new file mode 100644 index 00000000..aedba365 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/workflows/review-app.yml.nope @@ -0,0 +1,40 @@ +## Script isn't operational and is WIP + +name: Review app on pull request + +on: + pull_request: + branches: [ "main" ] + +jobs: + install: + + runs-on: ubuntu-latest + + steps: + - name: Install clever-tools + run: npm install -g clever-tools + + create: + + runs-on: ubuntu-latest + + steps: + - name: Create app on Clever Cloud + run: clever create --type static-apache {branch} --alias {branch} --region par --org ${{secrets.ORGA_ID}} + + configure: + + runs-on: ubuntu-latest + + steps: + - name: Set up app + run: clever link {branch} && clever domain add {branch}.cleverapps.io && clever link --org ${{secrets.ORGA_ID}} {branch} --alias {branch} + + deploy: + + runs-on: ubuntu-latest + + steps: + - name: Set up app + run: clever deploy \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/workflows/test-cli.yml b/.github/ISSUE_TEMPLATE/workflows/test-cli.yml new file mode 100644 index 00000000..9491f0f7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/workflows/test-cli.yml @@ -0,0 +1,27 @@ +name: Test CLI + +on: + push: + branches: + - ci-cd + +jobs: + job1: + runs-on: ubuntu-latest + outputs: + output1: ${{ steps.install.outputs.test }} + output2: ${{ steps.command.outputs.test }} + steps: + - id: install + run: npm install -g clever-tools >> "$GITHUB_OUTPUT" + - id: command + run: clever --version >> "$GITHUB_OUTPUT" + + job2: + runs-on: ubuntu-latest + needs: job1 + steps: + - env: + OUTPUT1: ${{needs.job1.outputs.output1}} + OUTPUT2: ${{needs.job1.outputs.output2}} + run: echo "$OUTPUT1 $OUTPUT2" \ No newline at end of file From 1c21501add5eae28402fd24411997c1c07c6ef48 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 15:08:50 +0100 Subject: [PATCH 09/21] relocate workflow files --- .github/{ISSUE_TEMPLATE => }/workflows/review-app.yml.nope | 0 .github/{ISSUE_TEMPLATE => }/workflows/test-cli.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ISSUE_TEMPLATE => }/workflows/review-app.yml.nope (100%) rename .github/{ISSUE_TEMPLATE => }/workflows/test-cli.yml (100%) diff --git a/.github/ISSUE_TEMPLATE/workflows/review-app.yml.nope b/.github/workflows/review-app.yml.nope similarity index 100% rename from .github/ISSUE_TEMPLATE/workflows/review-app.yml.nope rename to .github/workflows/review-app.yml.nope diff --git a/.github/ISSUE_TEMPLATE/workflows/test-cli.yml b/.github/workflows/test-cli.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/workflows/test-cli.yml rename to .github/workflows/test-cli.yml From b3c7fbd33b34f8c31b3170ef2ce245f46f09e8e2 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 15:14:45 +0100 Subject: [PATCH 10/21] modify test commands: remove outputs --- .github/workflows/test-cli.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml index 9491f0f7..b0b1ee62 100644 --- a/.github/workflows/test-cli.yml +++ b/.github/workflows/test-cli.yml @@ -6,22 +6,10 @@ on: - ci-cd jobs: - job1: - runs-on: ubuntu-latest - outputs: - output1: ${{ steps.install.outputs.test }} - output2: ${{ steps.command.outputs.test }} + install: + runs-on: ubuntu-latest steps: - id: install - run: npm install -g clever-tools >> "$GITHUB_OUTPUT" + run: npm install -g clever-tools - id: command - run: clever --version >> "$GITHUB_OUTPUT" - - job2: - runs-on: ubuntu-latest - needs: job1 - steps: - - env: - OUTPUT1: ${{needs.job1.outputs.output1}} - OUTPUT2: ${{needs.job1.outputs.output2}} - run: echo "$OUTPUT1 $OUTPUT2" \ No newline at end of file + run: clever --version From cf943fdbc1dbfde7179944e9832f49d129a0a5a4 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 17:10:00 +0100 Subject: [PATCH 11/21] test review app script --- .github/workflows/review-app.yml | 45 +++++++++++++++++++++++++++ .github/workflows/review-app.yml.nope | 40 ------------------------ 2 files changed, 45 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/review-app.yml delete mode 100644 .github/workflows/review-app.yml.nope diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml new file mode 100644 index 00000000..c95f61f9 --- /dev/null +++ b/.github/workflows/review-app.yml @@ -0,0 +1,45 @@ +## Script isn't operational and is WIP: check how to refer to branches + +name: Review app on pull request + +on: + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - id: install + run: npm install -g clever-tools + - id: create + run: clever create --type static-apache {branch} --alias {branch} --region par --org ${{secrets.ORGA_ID}} + - id: link + run: clever link --org ${{secrets.ORGA_ID}} {branch} --alias {branch} && clever scale --flavor XS + env: + runs-on: ubuntu-latest + steps: + - id: prebuild + run: clever env set CC_PRE_BUILD_HOOK "./clevercloud-deploy-script.sh" + - id: index + run: clever env set CC_WEBROOT "/public" + - id: hugo-env + run: clever env set HUGO_ENV "production" + - id: hugo-env + run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" + - id: php + run: clever env set CC_PHP_VERSION "7" + - id: hugo-env + run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" + - id: cgi + run: clever env set CC_CGI_IMPLEMENTATION "proxy_fcgi" + - id: composer + run: clever env set CC_COMPOSER_VERSION "2" + - id: domain + run: clever domain add {branch}.cleverapps.io && + + deploy: + runs-on: ubuntu-latest + steps: + - name: Set up app + run: clever deploy \ No newline at end of file diff --git a/.github/workflows/review-app.yml.nope b/.github/workflows/review-app.yml.nope deleted file mode 100644 index aedba365..00000000 --- a/.github/workflows/review-app.yml.nope +++ /dev/null @@ -1,40 +0,0 @@ -## Script isn't operational and is WIP - -name: Review app on pull request - -on: - pull_request: - branches: [ "main" ] - -jobs: - install: - - runs-on: ubuntu-latest - - steps: - - name: Install clever-tools - run: npm install -g clever-tools - - create: - - runs-on: ubuntu-latest - - steps: - - name: Create app on Clever Cloud - run: clever create --type static-apache {branch} --alias {branch} --region par --org ${{secrets.ORGA_ID}} - - configure: - - runs-on: ubuntu-latest - - steps: - - name: Set up app - run: clever link {branch} && clever domain add {branch}.cleverapps.io && clever link --org ${{secrets.ORGA_ID}} {branch} --alias {branch} - - deploy: - - runs-on: ubuntu-latest - - steps: - - name: Set up app - run: clever deploy \ No newline at end of file From 0c440932b735d15977b24351271414c81df33706 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 17:36:55 +0100 Subject: [PATCH 12/21] try review app without importing secrets --- .github/workflows/review-app.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index c95f61f9..c989dcea 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -1,10 +1,12 @@ -## Script isn't operational and is WIP: check how to refer to branches +## Script might not be operational (WIP) name: Review app on pull request on: pull_request: branches: [ "main" ] +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: setup: @@ -13,10 +15,10 @@ jobs: - id: install run: npm install -g clever-tools - id: create - run: clever create --type static-apache {branch} --alias {branch} --region par --org ${{secrets.ORGA_ID}} + run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - id: link - run: clever link --org ${{secrets.ORGA_ID}} {branch} --alias {branch} && clever scale --flavor XS - env: + run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS + set-env: runs-on: ubuntu-latest steps: - id: prebuild @@ -25,7 +27,7 @@ jobs: run: clever env set CC_WEBROOT "/public" - id: hugo-env run: clever env set HUGO_ENV "production" - - id: hugo-env + - id: hugo-version run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" - id: php run: clever env set CC_PHP_VERSION "7" @@ -36,7 +38,7 @@ jobs: - id: composer run: clever env set CC_COMPOSER_VERSION "2" - id: domain - run: clever domain add {branch}.cleverapps.io && + run: clever domain add ${{ env.BRANCH_NAME }}.cleverapps.io deploy: runs-on: ubuntu-latest From 27a16cc71d47d43b157ed0cd927fb6589b7b263e Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 17:44:02 +0100 Subject: [PATCH 13/21] add branch name as pull request source --- .github/workflows/review-app.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index c989dcea..be735c18 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -2,9 +2,12 @@ name: Review app on pull request +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + on: pull_request: - branches: [ "main" ] + branches: ${{ env.BRANCH_NAME }} env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} From cbdc85acdf70ad2b0131e074955ea258c3f9a9ce Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 17:50:24 +0100 Subject: [PATCH 14/21] replace id steps by names --- .github/workflows/review-app.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index be735c18..e7c4791c 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -24,23 +24,23 @@ jobs: set-env: runs-on: ubuntu-latest steps: - - id: prebuild + - name: prebuild run: clever env set CC_PRE_BUILD_HOOK "./clevercloud-deploy-script.sh" - - id: index + - name: index run: clever env set CC_WEBROOT "/public" - - id: hugo-env + - name: hugo-env run: clever env set HUGO_ENV "production" - - id: hugo-version + - name: hugo-version run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" - - id: php + - name: php run: clever env set CC_PHP_VERSION "7" - - id: hugo-env + - name: hugo-env run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" - - id: cgi + - name: cgi run: clever env set CC_CGI_IMPLEMENTATION "proxy_fcgi" - - id: composer + - name: composer run: clever env set CC_COMPOSER_VERSION "2" - - id: domain + - name: domain run: clever domain add ${{ env.BRANCH_NAME }}.cleverapps.io deploy: From c7aae2eb308b382815cebb1394e88ba9b515f74f Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 17:56:03 +0100 Subject: [PATCH 15/21] fix yaml syntax --- .github/workflows/review-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index e7c4791c..1b0c3078 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -24,8 +24,8 @@ jobs: set-env: runs-on: ubuntu-latest steps: - - name: prebuild - run: clever env set CC_PRE_BUILD_HOOK "./clevercloud-deploy-script.sh" + - name: prebuild + run: clever env set CC_PRE_BUILD_HOOK "./clevercloud-deploy-script.sh" - name: index run: clever env set CC_WEBROOT "/public" - name: hugo-env From f3f069272028b36bbcf64c0bfea109fb4a3fbaf2 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:00:16 +0100 Subject: [PATCH 16/21] set pull request to main --- .github/workflows/review-app.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index 1b0c3078..55a9d650 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -2,12 +2,13 @@ name: Review app on pull request +on: + pull_request: + branches: main + env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} -on: - pull_request: - branches: ${{ env.BRANCH_NAME }} env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} From 9052c09a7f59aa94b31f96108573f40e98520870 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:07:21 +0100 Subject: [PATCH 17/21] fix errors in script --- .github/workflows/review-app.yml | 44 ++++++++----------- .../{test-cli.yml => test-cli.yml.nope} | 0 2 files changed, 18 insertions(+), 26 deletions(-) rename .github/workflows/{test-cli.yml => test-cli.yml.nope} (100%) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index 55a9d650..882b582a 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -1,27 +1,12 @@ -## Script might not be operational (WIP) - -name: Review app on pull request - -on: - pull_request: - branches: main - -env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - +--- env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: - setup: + deploy: runs-on: ubuntu-latest steps: - - id: install - run: npm install -g clever-tools - - id: create - run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - - id: link - run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS + - name: Set up app + run: clever deploy set-env: runs-on: ubuntu-latest steps: @@ -32,20 +17,27 @@ jobs: - name: hugo-env run: clever env set HUGO_ENV "production" - name: hugo-version - run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" + run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}} - name: php run: clever env set CC_PHP_VERSION "7" - name: hugo-env - run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}}" + run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}} - name: cgi run: clever env set CC_CGI_IMPLEMENTATION "proxy_fcgi" - name: composer run: clever env set CC_COMPOSER_VERSION "2" - name: domain run: clever domain add ${{ env.BRANCH_NAME }}.cleverapps.io - - deploy: + setup: runs-on: ubuntu-latest steps: - - name: Set up app - run: clever deploy \ No newline at end of file + - id: install + run: npm install -g clever-tools + - id: create + run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} + - id: link + run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS +name: Review app on pull request +'on': + pull_request: + branches: main## Script might not be operational (WIP) diff --git a/.github/workflows/test-cli.yml b/.github/workflows/test-cli.yml.nope similarity index 100% rename from .github/workflows/test-cli.yml rename to .github/workflows/test-cli.yml.nope From eaead85a41c6dde84e6f282f197baab6381110a2 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:15:41 +0100 Subject: [PATCH 18/21] fix script --- .github/workflows/review-app.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index 882b582a..da351c9a 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -1,6 +1,11 @@ ---- +name: Review app on pull request + +on: + pull_request: + branches: main env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + jobs: deploy: runs-on: ubuntu-latest @@ -37,7 +42,5 @@ jobs: run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - id: link run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS -name: Review app on pull request -'on': - pull_request: - branches: main## Script might not be operational (WIP) + + From bc1593660ec67265c9dc79a956fe5545f3945880 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:37:28 +0100 Subject: [PATCH 19/21] import connect secrets --- .github/workflows/review-app.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index da351c9a..6f22bb49 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -1,17 +1,15 @@ -name: Review app on pull request - -on: - pull_request: - branches: main +--- +deploy: + runs-on: ubuntu-latest + steps: + - name: Set up app + run: clever deploy env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - + CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }} + CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }} + ORG_ID: ${{ secrets.ORG_ID }} jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Set up app - run: clever deploy set-env: runs-on: ubuntu-latest steps: @@ -38,9 +36,13 @@ jobs: steps: - id: install run: npm install -g clever-tools + - id: connect + run: clever login --token ${{ env.CLEVER_TOKEN }} --secret ${{ env.CLEVER_SECRET }} - id: create run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - id: link run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS - - +name: Review app on pull request +'on': + pull_request: + branches: main \ No newline at end of file From 74768146b3a552013799a080078d459a63216ce3 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:48:08 +0100 Subject: [PATCH 20/21] fix mess provoqued by yaml parser --- .github/workflows/review-app.yml | 47 +++++++++++++++++--------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index 6f22bb49..d226ca1d 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -1,15 +1,28 @@ ---- -deploy: - runs-on: ubuntu-latest - steps: - - name: Set up app - run: clever deploy +name: Review app on pull request + +on: + pull_request: + branches: main + env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }} CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }} - ORG_ID: ${{ secrets.ORG_ID }} + #ORGA_ID: ${{ secrets.ORGA_ID }} + HUGO_VERSION: + jobs: + setup: + runs-on: ubuntu-latest + steps: + - id: install + run: npm install -g clever-tools + - id: connect + run: clever login --token ${{ env.CLEVER_TOKEN }} --secret ${{ env.CLEVER_SECRET }} + - id: create + run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} + - id: link + run: clever link ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS set-env: runs-on: ubuntu-latest steps: @@ -20,29 +33,19 @@ jobs: - name: hugo-env run: clever env set HUGO_ENV "production" - name: hugo-version - run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}} + run: clever env set HUGO_VERSION ${{env.HUGO_VERSION}} - name: php run: clever env set CC_PHP_VERSION "7" - name: hugo-env - run: clever env set HUGO_VERSION "${{secrets.HUGO_VERSION}} + run: clever env set HUGO_VERSION ${{env.HUGO_VERSION}} - name: cgi run: clever env set CC_CGI_IMPLEMENTATION "proxy_fcgi" - name: composer run: clever env set CC_COMPOSER_VERSION "2" - name: domain run: clever domain add ${{ env.BRANCH_NAME }}.cleverapps.io - setup: + deploy: runs-on: ubuntu-latest steps: - - id: install - run: npm install -g clever-tools - - id: connect - run: clever login --token ${{ env.CLEVER_TOKEN }} --secret ${{ env.CLEVER_SECRET }} - - id: create - run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - - id: link - run: clever link --org ${{secrets.ORGA_ID}} ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS -name: Review app on pull request -'on': - pull_request: - branches: main \ No newline at end of file + - name: Set up app + run: clever deploy \ No newline at end of file From f92fffb36351d900d448a6cc23062c1fb1cf31a3 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 29 Nov 2023 18:53:02 +0100 Subject: [PATCH 21/21] we will get there eventually link just before deploying --- .github/workflows/review-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index d226ca1d..5a115894 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -21,8 +21,6 @@ jobs: run: clever login --token ${{ env.CLEVER_TOKEN }} --secret ${{ env.CLEVER_SECRET }} - id: create run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} - - id: link - run: clever link ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS set-env: runs-on: ubuntu-latest steps: @@ -47,5 +45,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: + - name: link + run: clever link ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} && clever scale --flavor XS - name: Set up app run: clever deploy \ No newline at end of file