-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create review apps CI/CD on pull requests
* fix broken links in quickstart * fix pgpool path on card * update readme: running instructions * Update README.md Update git clone commands and specify why initiating module might be required * update readme: running instructions * fix proxysql path on guides card * update Readme with fixed name for github repo when cloning * add test script files * relocate workflow files * modify test commands: remove outputs * test review app script * try review app without importing secrets * add branch name as pull request source * replace id steps by names * fix yaml syntax * set pull request to main * fix errors in script * fix script * import connect secrets * fix mess provoqued by yaml parser * we will get there eventually link just before deploying * idem * rm link step * add bash * divide bash steps * divide setpes * path checks * path checks * path checks without cloning * path checks without cloning * path checks with cloning * path checks without cd * use checkout action * use checkout action on review apps * remove branch on deploy command * update to most recent commit to create propre PR * add unshallow argument * deactivate git command
- Loading branch information
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 }} | ||
#ORGA_ID: ${{ secrets.ORGA_ID }} | ||
HUGO_VERSION: ${{ secrets.HUGO_VERSION }} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
#path: ${{ env.BRANCH_NAME }} | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." | ||
#- run: git fetch --unshallow | ||
- name: install clever-tools | ||
run: npm install -g clever-tools | ||
- name: Create app | ||
run: clever login --token ${{ env.CLEVER_TOKEN }} --secret ${{ env.CLEVER_SECRET }} | ||
- run: clever create --type static-apache ${{ env.BRANCH_NAME }} --alias ${{ env.BRANCH_NAME }} --region par --org ${{secrets.ORGA_ID}} | ||
- run: clever env set CC_PRE_BUILD_HOOK "./clevercloud-deploy-script.sh" | ||
- run: clever env set CC_WEBROOT "/public" | ||
- run: clever env set HUGO_ENV "production" | ||
- run: clever env set HUGO_VERSION ${{env.HUGO_VERSION}} | ||
- run: clever env set CC_PHP_VERSION "7" | ||
- run: clever env set CC_CGI_IMPLEMENTATION "proxy_fcgi" | ||
- run: clever env set CC_COMPOSER_VERSION "2" | ||
- run: clever domain add clever-doc-preprod-${{ env.BRANCH_NAME }}.cleverapps.io | ||
- name: Deploy | ||
run: clever deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test CLI | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci-cd | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." | ||
- name: install celevr-tools | ||
run: npm install -g clever-tools | ||
- run: clever --version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters