Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 44 additions & 40 deletions .github/workflows/ce-deploy-publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Publish documentation

# Run this workflow every time a new commit pushed to your repository
# Run this workflow on demand or every time a PR is accepted to a main branch
on:
pull_request:
types: [closed]
branches:
- 1.x
workflow_dispatch:

jobs:
# Set the job key. The key is displayed as the job name
Expand All @@ -14,51 +15,54 @@ jobs:
# Name the Job
name: Publish ce-deploy documentation
# Set the type of machine to run on
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

# Use our ce-dev Debian base container
container:
image: codeenigma/ce-dev-controller:2.x
volumes:
- ${{ github.workspace }}:/home/controller

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- name: Install wiki2pages
run: /usr/bin/su - ce-dev -c "/usr/bin/git clone https://github.com/codeenigma/wikis2pages.git /home/ce-dev/build/wiki2pages"

- name: Update local applications
run: |
/usr/bin/su - ce-dev -c "cd /home/ce-dev/ce-provision && /usr/bin/git pull origin 2.x"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/ce-deploy && /usr/bin/git pull origin 1.x"

# Configures global Git variables for committing
- name: Configure Git
- name: Set up Ansible hosts file
run: |
git config --global user.email "[email protected]"
git config --global user.name "Code Enigma CI"
mkdir -p /home/ce-dev/ansible/bin/hosts
echo "wikis2pages-hugo ansible_host=127.0.0.1" > /home/ce-dev/ansible/bin/hosts/hosts

# Installs the ce-dev stack
- name: Install ce-dev
- name: Set up SSH config
run: |
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux
echo "StrictHostKeyChecking=no" > /home/ce-dev/.ssh/config
cat /home/ce-dev/.ssh/id_rsa.pub > /home/ce-dev/.ssh/authorized_keys
chown ce-dev:ce-dev /home/ce-dev/.ssh/config
chmod 700 /home/ce-dev/.ssh/config
chown ce-dev:ce-dev /home/ce-dev/.ssh/authorized_keys
chmod 700 /home/ce-dev/.ssh/authorized_keys

- name: Start SSHD
run: /usr/sbin/sshd&

# Builds the table of contents for the docs
- name: Documentation (build table of contents)
if: ${{ github.event.pull_request.base.ref == '1.x' }}
run: contribute/toc.sh
shell: bash
- name: Initialise wiki2pages for ce-deploy ${{ github.event.pull_request.base.ref }}
run: |
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && /bin/sh init.sh --repo https://github.com/codeenigma/ce-deploy.git --branch ${{ github.event.pull_request.base.ref }} --no-ce-dev"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && /home/ce-dev/ansible/bin/ansible-playbook -e 'wiki2pages_build_path=/home/ce-dev/build/wiki2pages' -i /home/ce-dev/ansible/bin/hosts /home/ce-dev/build/wiki2pages/ce-dev/ansible/provision.yml"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && /bin/sh set-current.sh --project ce-deploy-${{ github.event.pull_request.base.ref }} --no-ce-dev"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && /home/ce-dev/ansible/bin/ansible-playbook -e 'wiki2pages_build_path=/home/ce-dev/build/wiki2pages launch_hugo_server=false' -i /home/ce-dev/ansible/bin/hosts /home/ce-dev/build/wiki2pages/ce-dev/ansible/deploy.yml"

- name: Run Hugo
run: |
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && hugo"
ls -la /home/ce-dev/build/wiki2pages/public/ce-deploy-${{ github.event.pull_request.base.ref }}/

# Uses the ce-dev stack to run Hugo to build and deploy the docs
- name: Documentation (build and publish)
if: ${{ github.event.pull_request.base.ref == '1.x' }}
- name: Publish documentation
run: |
cd
git clone https://github.com/codeenigma/wikis2pages.git
cd wikis2pages
/bin/bash init.sh https://${{ secrets.GITHUB_TOKEN }}@github.com/codeenigma/ce-deploy.git 1.x
/bin/sh set-current.sh ce-deploy-1.x-travis
docker exec --user ce-dev --workdir /home/ce-dev/deploy/live.local wikis2pages-hugo hugo
/bin/sh .github-actions-push.sh
cd /home/runner/wikis2pages/public/ce-deploy-1.x-travis
git remote add ci https://${{ secrets.DOCS_GITHUB_TOKEN }}@github.com/codeenigma/ce-deploy-docs.git
git push ci master
shell: bash
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && /bin/sh /home/ce-dev/build/wiki2pages/.github-actions-push.sh"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages/public/ce-deploy-${{ github.event.pull_request.base.ref }} && /usr/bin/git remote add ci https://${{ secrets.DOCS_GITHUB_TOKEN }}@github.com/codeenigma/ce-deploy-docs.git"
/usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages/public/ce-deploy-${{ github.event.pull_request.base.ref }} && /usr/bin/git push ci master"
4 changes: 2 additions & 2 deletions contribute/toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ parse_roles_toc(){
"# "*)
if [ "$WRITE" = "true" ]; then
TITLE=$(echo "$LINE" | cut -c 3-)
echo "$INDENT"" - [$TITLE](/$RELATIVE)" >> "$TMP_SIDEBAR"
echo "$INDENT"" - [$TITLE]($RELATIVE)" >> "$TMP_SIDEBAR"
WRITE="false"
fi
;;
Expand All @@ -137,4 +137,4 @@ generate_roles_toc

cp_single_page install
cp_single_page contribute
cp_single_page scripts
cp_single_page scripts
95 changes: 47 additions & 48 deletions docs/_Sidebar.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
 
- [Home](/)
- [Install](/install)
- [Usage](/scripts)
- [Home]()
- [Install](install)
- [Usage](scripts)
- [Roles](roles)
- [API call](/roles/api_call)
- [Config](/roles/cache_clear)
- [Drupal 7](/roles/cache_clear/cache_clear-drupal7)
- [Drupal 8](/roles/cache_clear/cache_clear-drupal8)
- [Matomo](/roles/cache_clear/cache_clear-matomo)
- [Drupal 8](/roles/cache_clear/cache_clear-mautic)
- [Opcache](/roles/cache_clear/cache_clear-opcache)
- [Symfony](/roles/cache_clear/cache_clear-symfony)
- [ce-dev](/roles/ce_dev)
- [ce-dev prebuild](/roles/ce_dev/ce_dev_prebuild)
- [CLI Tools](/roles/cli)
- [Drush](/roles/cli/cachetool)
- [Drush](/roles/cli/drush)
- [Composer](/roles/composer)
- [Config](/roles/config_generate)
- [Drupal 7](/roles/config_generate/config_generate-drupal7)
- [Drupal 8](/roles/config_generate/config_generate-drupal8)
- [Drupal 8](/roles/config_generate/config_generate-matomo)
- [Mautic](/roles/config_generate/config_generate-mautic)
- [Cron](/roles/cron)
- [Database backup cron task](/roles/cron/cron_database_backup)
- [Database backup cron task - MySQL](/roles/cron/cron_database_backup/cron_database_backup-mysql)
- [Drupal 7 cron](/roles/cron/cron_drupal7)
- [Drupal 8 cron](/roles/cron/cron_drupal8)
- [Database backup cron task - MySQL](/roles/cron/cron_matomo)
- [Mautic cron tasks](/roles/cron/cron_mautic)
- [Data backups](/roles/database_backup)
- [MySQL backups](/roles/database_backup/database_backup-mysql)
- [Deploy](/roles/deploy_code)
- [Deploy container](/roles/deploy_container)
- [Exit](/roles/_exit)
- [Init](/roles/_init)
- [LHCI run](/roles/lhci_run)
- [Maintenance Mode](/roles/maintenance_mode)
- ["Meta"](/roles/_meta)
- [Drupal 10](/roles/_meta/deploy-drupal10)
- [Drupal 7](/roles/_meta/deploy-drupal7)
- [Drupal 8](/roles/_meta/deploy-drupal8)
- [Matomo](/roles/_meta/deploy-matomo)
- [Mautic](/roles/_meta/deploy-mautic)
- [SimpleSAMLphp](/roles/_meta/deploy-simplesamlphp)
- [NPM](/roles/npm)
- [Sync roles](/roles/sync)
- [Database sync](/roles/sync/database_sync)
- [Database sync - MySQL](/roles/sync/database_sync/database_sync-mysql)
- [API call](roles/api_call)
- [Config](roles/cache_clear)
- [Drupal 7](roles/cache_clear/cache_clear-drupal7)
- [Drupal 8](roles/cache_clear/cache_clear-drupal8)
- [Matomo](roles/cache_clear/cache_clear-matomo)
- [Opcache](roles/cache_clear/cache_clear-opcache)
- [Symfony](roles/cache_clear/cache_clear-symfony)
- [ce-dev](roles/ce_dev)
- [ce-dev prebuild](roles/ce_dev/ce_dev_prebuild)
- [CLI Tools](roles/cli)
- [Drush](roles/cli/cachetool)
- [Drush](roles/cli/drush)
- [Composer](roles/composer)
- [Config](roles/config_generate)
- [Drupal 7](roles/config_generate/config_generate-drupal7)
- [Drupal 8](roles/config_generate/config_generate-drupal8)
- [Drupal 8](roles/config_generate/config_generate-matomo)
- [Mautic](roles/config_generate/config_generate-mautic)
- [Cron](roles/cron)
- [Database backup cron task](roles/cron/cron_database_backup)
- [Database backup cron task - MySQL](roles/cron/cron_database_backup/cron_database_backup-mysql)
- [Drupal 7 cron](roles/cron/cron_drupal7)
- [Drupal 8 cron](roles/cron/cron_drupal8)
- [Database backup cron task - MySQL](roles/cron/cron_matomo)
- [Mautic cron tasks](roles/cron/cron_mautic)
- [Data backups](roles/database_backup)
- [MySQL backups](roles/database_backup/database_backup-mysql)
- [Deploy](roles/deploy_code)
- [Deploy container](roles/deploy_container)
- [Exit](roles/_exit)
- [Init](roles/_init)
- [LHCI run](roles/lhci_run)
- [Maintenance Mode](roles/maintenance_mode)
- ["Meta"](roles/_meta)
- [Drupal 10](roles/_meta/deploy-drupal10)
- [Drupal 7](roles/_meta/deploy-drupal7)
- [Drupal 8](roles/_meta/deploy-drupal8)
- [Matomo](roles/_meta/deploy-matomo)
- [Mautic](roles/_meta/deploy-mautic)
- [SimpleSAMLphp](roles/_meta/deploy-simplesamlphp)
- [NPM](roles/npm)
- [Sync roles](roles/sync)
- [Database sync](roles/sync/database_sync)
- [Database sync - MySQL](roles/sync/database_sync/database_sync-mysql)
7 changes: 0 additions & 7 deletions docs/roles/cache_clear/cache_clear-mautic.md

This file was deleted.

Loading