diff --git a/_drafts/staging/Dockerfile b/.github/scripts/staging/Dockerfile similarity index 100% rename from _drafts/staging/Dockerfile rename to .github/scripts/staging/Dockerfile diff --git a/.github/scripts/staging/README.md b/.github/scripts/staging/README.md new file mode 100755 index 00000000..57e1719d --- /dev/null +++ b/.github/scripts/staging/README.md @@ -0,0 +1,5 @@ +# Staging Test Environment + +This is an HTTP staging area - to test interactions between orionrobots code, htaccess files, and Apache. The conf files intend to reflect a hosting company's settings. + +This staging environment is used by the GitHub Actions workflows to test the built site before deployment. diff --git a/_drafts/staging/default.conf b/.github/scripts/staging/default.conf similarity index 100% rename from _drafts/staging/default.conf rename to .github/scripts/staging/default.conf diff --git a/_drafts/staging/http2.conf b/.github/scripts/staging/http2.conf similarity index 100% rename from _drafts/staging/http2.conf rename to .github/scripts/staging/http2.conf diff --git a/_drafts/staging/httpd.conf b/.github/scripts/staging/httpd.conf similarity index 100% rename from _drafts/staging/httpd.conf rename to .github/scripts/staging/httpd.conf diff --git a/.github/workflows/on_call_build_site.yaml b/.github/workflows/on_call_build_site.yaml index 4f6bc618..cb6beb98 100644 --- a/.github/workflows/on_call_build_site.yaml +++ b/.github/workflows/on_call_build_site.yaml @@ -27,5 +27,5 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: httpd.conf - path: _drafts/staging/httpd.conf + path: .github/scripts/staging/httpd.conf if-no-files-found: error diff --git a/.github/workflows/on_call_staging_test.yaml b/.github/workflows/on_call_staging_test.yaml index 390be801..c6f14995 100644 --- a/.github/workflows/on_call_staging_test.yaml +++ b/.github/workflows/on_call_staging_test.yaml @@ -16,8 +16,8 @@ jobs: tar -xzf _site.tar.gz - name: Prepare for docker build run: | - cp _drafts/staging/Dockerfile _site/ - cp _drafts/staging/http2.conf _site/ + cp .github/scripts/staging/Dockerfile _site/ + cp .github/scripts/staging/http2.conf _site/ - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/on_push_to_master_test_and_deploy.yaml b/.github/workflows/on_push_to_master_test_and_deploy.yaml index fdc55262..4e405554 100644 --- a/.github/workflows/on_push_to_master_test_and_deploy.yaml +++ b/.github/workflows/on_push_to_master_test_and_deploy.yaml @@ -59,7 +59,7 @@ jobs: uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: name: httpd.conf - path: _drafts/staging/httpd.conf + path: .github/scripts/staging/httpd.conf # Sync the files - name: Sync the site over diff --git a/README.md b/README.md index 6767a8ac..740505fe 100644 --- a/README.md +++ b/README.md @@ -52,3 +52,13 @@ Attaching to orionrobotsgithubio-web-1 orionrobotsgithubio-web-1 | ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux-musl] ``` +## Staging Test Environment + +The staging test environment is located in `.github/scripts/staging/` and contains Docker configuration files used for testing the built site before deployment. This environment: + +- Tests the site with Apache configuration that mirrors the hosting environment +- Validates that htaccess rules work correctly +- Ensures the site serves properly before deployment + +The staging tests run automatically in CI/CD workflows when changes are pushed to the master branch or in pull requests. + diff --git a/_drafts/staging/README.md b/_drafts/staging/README.md deleted file mode 100755 index e0386e83..00000000 --- a/_drafts/staging/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Environment for using JB - -This is an http staging area - to test interactions between orionrobots code, htaccess files, and apache. The conf files intend to reflect a hosting companies settings. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 11f62183..7e1e5d1b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,7 +82,7 @@ services: target: httpd_serve volumes: - ./_site:/usr/local/apache2/htdocs/ - - ./_drafts/staging/http2.conf:/etc/nginx/conf.d/http2.conf + - ./.github/scripts/staging/http2.conf:/usr/local/apache2/conf/http2.conf - ./htaccess:/usr/local/apache2/htdocs/.htaccess ports: - 8082:80 diff --git a/serve.Dockerfile b/serve.Dockerfile index c0c47293..126d7af2 100644 --- a/serve.Dockerfile +++ b/serve.Dockerfile @@ -22,6 +22,6 @@ FROM dcycle/broken-link-checker:3 AS broken_link_checker FROM httpd:2.4.64 AS httpd_serve # COPY _site /var/www/html/ -COPY _drafts/staging/http2.conf /etc/httpd/conf/httpd.conf +COPY .github/scripts/staging/http2.conf /etc/httpd/conf/httpd.conf FROM base