From 06357d439a26d00b282a3393b7e68ef4dd12a7fc Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 7 Jan 2023 09:40:02 +0900 Subject: [PATCH 1/4] chore: copy files from codeigniter4/userguide --- admin/userguide/.github/scripts/deploy | 15 +++++++++++++ admin/userguide/.github/workflows/deploy.yml | 22 +++++++++++++++++++ admin/userguide/.gitignore | 17 +++++++++++++++ admin/userguide/LICENSE | 21 ++++++++++++++++++ admin/userguide/README.md | 23 ++++++++------------ admin/userguide/composer.json | 16 -------------- 6 files changed, 84 insertions(+), 30 deletions(-) create mode 100755 admin/userguide/.github/scripts/deploy create mode 100644 admin/userguide/.github/workflows/deploy.yml create mode 100644 admin/userguide/.gitignore create mode 100644 admin/userguide/LICENSE delete mode 100644 admin/userguide/composer.json diff --git a/admin/userguide/.github/scripts/deploy b/admin/userguide/.github/scripts/deploy new file mode 100755 index 000000000000..0347c004dfff --- /dev/null +++ b/admin/userguide/.github/scripts/deploy @@ -0,0 +1,15 @@ +#!/bin/sh -e + +# Deploys the User Guide to the production +# website. Triggered by updates to the GitHub +# repo's master branch. + +REPO=/opt/userguide +SITE=/home/public_html/userguides/userguide4 + +cd "$REPO" +git switch master +git pull + +rm -rf "$SITE" +cp -R "$REPO/docs" "$SITE" diff --git a/admin/userguide/.github/workflows/deploy.yml b/admin/userguide/.github/workflows/deploy.yml new file mode 100644 index 000000000000..ac8027fc7410 --- /dev/null +++ b/admin/userguide/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +# Deploys the User Guide to the production +# website whenever master branch is updated +name: Deploy Production + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: executing remote ssh commands using ssh key + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + port: ${{ secrets.PORT }} + script: /opt/userguide/.github/scripts/deploy diff --git a/admin/userguide/.gitignore b/admin/userguide/.gitignore new file mode 100644 index 000000000000..bfea17cdc5bb --- /dev/null +++ b/admin/userguide/.gitignore @@ -0,0 +1,17 @@ +*/config/development +*/logs/log-*.php +!*/logs/index.html +*/cache/* +!*/cache/index.html +!*/cache/.htaccess + +user_guide_src/build/* +user_guide_src/cilexer/build/* +user_guide_src/cilexer/dist/* +user_guide_src/cilexer/pycilexer.egg-info/* + +#codeigniter 3 +application/logs/* +!application/logs/index.html +!application/logs/.htaccess +/vendor/ diff --git a/admin/userguide/LICENSE b/admin/userguide/LICENSE new file mode 100644 index 000000000000..81ddccc3d847 --- /dev/null +++ b/admin/userguide/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 CodeIgniter 4 web framework + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/admin/userguide/README.md b/admin/userguide/README.md index 10d85692bc38..0ea07075db61 100644 --- a/admin/userguide/README.md +++ b/admin/userguide/README.md @@ -1,20 +1,15 @@ # CodeIgniter 4 User Guide -## What is CodeIgniter? - -CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. +CodeIgniter 4 is a PHP web framework that is light, fast, flexible, and secure. More information can be found at the [official site](http://codeigniter.com). -This repository holds a composer-installable pre-built user guide for the framework. -It has been built from the -[development repository](https://github.com/codeigniter4/CodeIgniter4). - -More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums. - -## Installation & updates +**This is a read-only repository used to publish the user guide for the current release.** +It is built automatically as part of the framework release workflow, and pull +requests are not accepted here. -`composer require codeigniter4/userguide` will install a copy -of the user guide inside your project, at -`vendor/codeigniter4/userguide`. You can then `composer update` whenever -there is a new release of the framework. +Development is done in the [main repository](https://github.com/codeigniter4/codeigniter4). +If you find problems with the user guide, please submit a correcting pull request there. +If you feel that features are missing or unclear, please comment on our +[forum](https://forum.codeigniter.com/index.php), +in the appropriate CodeIgniter4 subforum. diff --git a/admin/userguide/composer.json b/admin/userguide/composer.json deleted file mode 100644 index 007664b9b2ec..000000000000 --- a/admin/userguide/composer.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "codeigniter4/userguide", - "type": "project", - "description": "CodeIgniter4 user guide", - "homepage": "https://codeigniter.com", - "license": "MIT", - "require": { - "php": "^7.4 || ^8.0", - "codeigniter4/framework": "^4" - }, - "support": { - "forum": "https://forum.codeigniter.com/", - "source": "https://github.com/codeigniter4/CodeIgniter4", - "slack": "https://codeigniterchat.slack.com" - } -} From 4c4dc80b40b9b38b468643bd2400ef7b849b79df Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 7 Jan 2023 09:45:26 +0900 Subject: [PATCH 2/4] chore: copy files in this repo to userguide --- .github/scripts/deploy-userguide | 6 ++++++ admin/userguide/LICENSE | 21 --------------------- 2 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 admin/userguide/LICENSE diff --git a/.github/scripts/deploy-userguide b/.github/scripts/deploy-userguide index abbb768a5017..7ad20ba82e2d 100755 --- a/.github/scripts/deploy-userguide +++ b/.github/scripts/deploy-userguide @@ -23,6 +23,12 @@ cd $TARGET git checkout master rm -rf docs +# Copy common files +cp -Rf ${SOURCE}/LICENSE ./ + +# Copy repo-specific files +cp -Rf ${SOURCE}/admin/userguid/. ./ + # Copy files cp -Rf ${SOURCE}/user_guide_src/build/html ./docs cp -Rf ${SOURCE}/user_guide_src/build/epub/CodeIgniter.epub ./CodeIgniter${VERSION}.epub diff --git a/admin/userguide/LICENSE b/admin/userguide/LICENSE deleted file mode 100644 index 81ddccc3d847..000000000000 --- a/admin/userguide/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 CodeIgniter 4 web framework - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From bb2aea6c65a18c638fd008614ab09cb5c3b11c92 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 7 Jan 2023 10:09:33 +0900 Subject: [PATCH 3/4] chore: remove items for codeigniter 3 --- admin/userguide/.gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/admin/userguide/.gitignore b/admin/userguide/.gitignore index bfea17cdc5bb..d0eba7f4bdaa 100644 --- a/admin/userguide/.gitignore +++ b/admin/userguide/.gitignore @@ -10,8 +10,4 @@ user_guide_src/cilexer/build/* user_guide_src/cilexer/dist/* user_guide_src/cilexer/pycilexer.egg-info/* -#codeigniter 3 -application/logs/* -!application/logs/index.html -!application/logs/.htaccess /vendor/ From a0eb83124c43a53c47d62817a059f71cadf73868 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 7 Jan 2023 10:10:46 +0900 Subject: [PATCH 4/4] chore: fix typo --- .github/scripts/deploy-userguide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/deploy-userguide b/.github/scripts/deploy-userguide index 7ad20ba82e2d..b67c1da94c13 100755 --- a/.github/scripts/deploy-userguide +++ b/.github/scripts/deploy-userguide @@ -27,7 +27,7 @@ rm -rf docs cp -Rf ${SOURCE}/LICENSE ./ # Copy repo-specific files -cp -Rf ${SOURCE}/admin/userguid/. ./ +cp -Rf ${SOURCE}/admin/userguide/. ./ # Copy files cp -Rf ${SOURCE}/user_guide_src/build/html ./docs