Fixing errors when file getting by ID from configs - doesn't exists (#4) #2
Workflow file for this run
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
name: CD | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
publish: | |
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' | |
name: Publish | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://niklan.net | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create SSH key | |
uses: ./.github/actions/create-ssh-key | |
with: | |
private-key: ${{ secrets.cd_production_deploy_key }} | |
user: ${{ secrets.cd_production_user }} | |
host: ${{ secrets.cd_production_host }} | |
port: ${{ secrets.cd_production_port }} | |
- name: Sync content | |
shell: bash | |
run: | | |
ssh server <<< " | |
cd ${{ secrets.cd_production_content_directiory }} | |
mkdir -p ${{ secrets.cd_production_deploy_files }} | |
drush sql:dump \ | |
--gzip \ | |
--structure-tables-list=cache,cache_*,flood,history,queue,search_index,search_api_*,semaphore,sequences,sessions,watchdog \ | |
> ${{ secrets.cd_production_deploy_directory }}/pre-deploy.sql.gz | |
git fetch | |
git checkout | |
git pull | |
drush niklan:sync:blog | |
" |