Skip to content

Add new IP to the Paris region #56

Add new IP to the Paris region

Add new IP to the Paris region #56

Workflow file for this run

name: Review app on pull request
on:
pull_request_target:
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
environment:
name: PR review apps
url: clever-doc-preprod-${{ env.BRANCH_NAME }}.cleverapps.io
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
- name: Comment PR
uses: actions/github-script@v5
with:
script: |
const issue_number = context.payload.pull_request.number;
const message = `Deployment has finished. Your app is available [here](https://clever-doc-preprod-${process.env.BRANCH_NAME}.cleverapps.io)`;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: message
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}