Files
archived-doctrine-website/.github/workflows/deployment.yml
dependabot[bot] 387fbb7418 Bump ramsey/composer-install from 3 to 4
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 3 to 4.
- [Release notes](https://github.com/ramsey/composer-install/releases)
- [Commits](https://github.com/ramsey/composer-install/compare/v3...v4)

---
updated-dependencies:
- dependency-name: ramsey/composer-install
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 23:22:38 +00:00

75 lines
2.3 KiB
YAML

name: "Deployment workflow"
on:
workflow_call:
inputs:
environment:
required: true
type: string
search-index-only:
description: 'Only build the search index without deployment'
required: false
type: boolean
default: false
secrets:
doctrine_website_algolia_admin_api_key:
required: true
doctrine_website_stripe_secret_key:
required: true
doctrine_website_send_grid_api_key:
required: true
doctrine_website_deployment_token:
required: true
jobs:
deploy:
runs-on: "ubuntu-latest"
env:
doctrine_website_github_http_token: "${{ secrets.doctrine_website_deployment_token }}"
doctrine_website_algolia_admin_api_key: "${{ secrets.doctrine_website_algolia_admin_api_key }}"
doctrine_website_stripe_secret_key: "${{ secrets.doctrine_website_stripe_secret_key }}"
doctrine_website_send_grid_api_key: "${{ secrets.doctrine_website_send_grid_api_key }}"
steps:
- uses: "actions/checkout@v6"
- name: "Setup PHP Action"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.5"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v4"
with:
composer-options: "--no-progress --no-suggest --no-dev"
- name: "Installation of node"
uses: "actions/setup-node@v6"
with:
node-version: '22'
- name: "yarn install"
run: "yarn install"
- name: "Prepare Website files"
if: "! inputs.search-index-only"
run: "bin/console --env=${{ inputs.environment }} build"
- name: "Build search index"
if: "inputs.search-index-only"
run: "bin/console --env=${{ inputs.environment }} build --search"
- name: "Deploy to ${{ inputs.environment }}"
if: "! inputs.search-index-only"
uses: "cpina/github-action-push-to-another-repository@v1.7"
env:
API_TOKEN_GITHUB: "${{ secrets.doctrine_website_deployment_token }}"
with:
source-directory: "build-${{ inputs.environment }}"
destination-github-username: "doctrine"
destination-repository-name: "doctrine-website-build-${{ inputs.environment }}"
target-branch: "master"
commit-message: "New version of Doctrine website"