<commit_before># CI/CD

## GitHub Actions

Use official [GitHub Action for Deployer](https://github.com/deployphp/action).

Create `.github/workflows/deploy.yml` file with following content:

```yaml
name: deploy

on:
  push:
    branches: [master]

concurrency: production_environment

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.0"

      - name: Deploy
        uses: deployphp/action@v1
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          dep: deploy
```

:::warning
The `concurrency: production_environment` is important as it prevents concurrent
deploys.
:::

## GitLab CI/CD

Set the following variables in GitLab project:

- `SSH_KNOW_HOSTS`: Content of `~/.ssh/known_hosts` file.
  The public SSH keys for a host may be obtained using the utility `ssh-keyscan`.
  For example: `ssh-keyscan deployer.org`.
- `SSH_PRIVATE_KEY`: Private key for connecting to remote hosts.
  To generate private key: `ssh-keygen -t ed25519 -C '<EMAIL>'`.

Create .gitlab-ci.yml file with following content:

```yml
stages:
  - deploy

deploy:
  stage: deploy
  image:
    name: deployphp/deployer:7
    entrypoint: [""]
  before_script:
    - mkdir -p ~/.ssh
    - eval $(ssh-agent -s)
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
  script:
    - dep deploy -vvv
  resource_group: production
  only:
    - master
```
<commit_msg>Fix typo for SSH_KNOWN_HOSTS in CI/CD docs (#3310)<commit_after># CI/CD

## GitHub Actions

Use official [GitHub Action for Deployer](https://github.com/deployphp/action).

Create `.github/workflows/deploy.yml` file with following content:

```yaml
name: deploy

on:
  push:
    branches: [master]

concurrency: production_environment

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.0"

      - name: Deploy
        uses: deployphp/action@v1
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          dep: deploy
```

:::warning
The `concurrency: production_environment` is important as it prevents concurrent
deploys.
:::

## GitLab CI/CD

Set the following variables in GitLab project:

- `SSH_KNOWN_HOSTS`: Content of `~/.ssh/known_hosts` file.
  The public SSH keys for a host may be obtained using the utility `ssh-keyscan`.
  For example: `ssh-keyscan deployer.org`.
- `SSH_PRIVATE_KEY`: Private key for connecting to remote hosts.
  To generate private key: `ssh-keygen -t ed25519 -C '<EMAIL>'`.

Create .gitlab-ci.yml file with following content:

```yml
stages:
  - deploy

deploy:
  stage: deploy
  image:
    name: deployphp/deployer:7
    entrypoint: [""]
  before_script:
    - mkdir -p ~/.ssh
    - eval $(ssh-agent -s)
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
  script:
    - dep deploy -vvv
  resource_group: production
  only:
    - master
```

{'fraction_non_alphanumeric': 0.12252475247524752, 'fraction_numerical': 0.009900990099009901, 'mean_word_length': 2.808009422850412, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1819046', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1098, 'n_words': 313}