Some checks failed
WordPress deployment / deploy (push) Failing after 6s
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: WordPress deployment
|
|
run-name: ${{ gitea.actor }} deploying ${{ gitea.repository.name }}
|
|
on: [push]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: php:8.2-cli
|
|
|
|
env:
|
|
COMPOSER_CACHE_DIR: ~/.cache/composer
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Composer (if not already installed)
|
|
run: |
|
|
curl -sS https://getcomposer.org/installer | php
|
|
mv composer.phar /usr/local/bin/composer
|
|
|
|
- name: Display existing composer cache (if runner reused)
|
|
run: ls -la $COMPOSER_CACHE_DIR || echo "No cache found"
|
|
|
|
- name: Install PHP dependencies
|
|
run: |
|
|
php -v
|
|
composer --version
|
|
composer install --no-interaction --prefer-dist --optimize-autoloader
|
|
|
|
- name: Clone WordPress scripts
|
|
env:
|
|
TEMPLATES_REPO_TOKEN: ${{ secrets.TEMPLATES_REPO_TOKEN }}
|
|
run: |
|
|
git clone https://$TEMPLATES_REPO_TOKEN@gitea.websimple.com/templates/wp-scripts.git /tmp/wp-scripts
|
|
|
|
- name: List files in the repository
|
|
run: ls -la ${{ gitea.workspace }}
|