From d2939c6f04e8f07be43510c263c5c55ee83af7a5 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 05:54:34 +0800 Subject: [PATCH 01/13] feat: pull development image, #59 * wip: test pulling every 2 hours --- .github/workflows/pull-images.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pull-images.yml diff --git a/.github/workflows/pull-images.yml b/.github/workflows/pull-images.yml new file mode 100644 index 00000000..1fcc43d7 --- /dev/null +++ b/.github/workflows/pull-images.yml @@ -0,0 +1,27 @@ +# Pull the Docker images from Docker Hub on schedule +name: Pull Docker Images + +on: + schedule: + - cron: '0 */2 * * *' # test Docker pull every 2 hrs + # Runs "At 00:00 on day-of-month 1 in every 2nd month." + # - cron: '0 0 1 */2 *' + +jobs: + pull-images: + name: Pull Development Image + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + + - name: Fetch and check out latest tag + run: | + git fetch --tags + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) + echo "Checking out latest tag: $LATEST_TAG" + git checkout $LATEST_TAG + echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV + + - name: Pull Development Image + run: docker compose -f docker-compose.dev.yml pull From 88ac17d424f0f8be9884fa1e6629ee61316b0077 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:07:39 +0800 Subject: [PATCH 02/13] chore: upload google search console files, #55 --- docs/public/google5ed7810677ed88f2.html | 1 + docs/public/sitemap.txt | 40 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 docs/public/google5ed7810677ed88f2.html create mode 100644 docs/public/sitemap.txt diff --git a/docs/public/google5ed7810677ed88f2.html b/docs/public/google5ed7810677ed88f2.html new file mode 100644 index 00000000..1fe8e576 --- /dev/null +++ b/docs/public/google5ed7810677ed88f2.html @@ -0,0 +1 @@ +google-site-verification: google5ed7810677ed88f2.html \ No newline at end of file diff --git a/docs/public/sitemap.txt b/docs/public/sitemap.txt new file mode 100644 index 00000000..7fcf247c --- /dev/null +++ b/docs/public/sitemap.txt @@ -0,0 +1,40 @@ +https://acaptutorials.github.io/ +https://acaptutorials.github.io/changelog/ +https://acaptutorials.github.io/security/ +https://acaptutorials.github.io/video/ +https://acaptutorials.github.io/about/ +https://acaptutorials.github.io/requirements/ +https://acaptutorials.github.io/installation/ +https://acaptutorials.github.io/installation/firebase/ +https://acaptutorials.github.io/installation/server-setup/ +https://acaptutorials.github.io/installation/client-setup/ +https://acaptutorials.github.io/installation/integration/ +https://acaptutorials.github.io/installation/accounts/ +https://acaptutorials.github.io/installation/conclusion/ +https://acaptutorials.github.io/post-installation/ +https://acaptutorials.github.io/post-installation/webmap/ +https://acaptutorials.github.io/post-installation/pdf/ +https://acaptutorials.github.io/post-installation/weather-forecasts/ +https://acaptutorials.github.io/post-installation/weather-forecasts/seasonal-forecast/ +https://acaptutorials.github.io/post-installation/weather-forecasts/tenday-forecast/ +https://acaptutorials.github.io/post-installation/weather-forecasts/special-forecast/ +https://acaptutorials.github.io/post-installation/cropping-calendar/ +https://acaptutorials.github.io/post-installation/cropping-calendar/calendar-v1/ +https://acaptutorials.github.io/post-installation/cropping-calendar/calendar-v2/ +https://acaptutorials.github.io/post-installation/recommendations/ +https://acaptutorials.github.io/post-installation/recommendations/recommendations-v1/ +https://acaptutorials.github.io/post-installation/recommendations/recommendations-v2/ +https://acaptutorials.github.io/post-installation/acap-rcmas-api/ +https://acaptutorials.github.io/post-installation/opengraph/ +https://acaptutorials.github.io/post-installation/google-search/ +https://acaptutorials.github.io/post-installation/province-codes/ +https://acaptutorials.github.io/checklist/ +https://acaptutorials.github.io/directories/ +https://acaptutorials.github.io/directories/client/ +https://acaptutorials.github.io/directories/server/ +https://acaptutorials.github.io/articles/deployment/ +https://acaptutorials.github.io/articles/pdf-development/ +https://acaptutorials.github.io/articles/provinces-municipalities/ +https://acaptutorials.github.io/articles/opensource-libraries/ +https://acaptutorials.github.io/troubleshooting/ +https://acaptutorials.github.io/references/ From 5d883733066c6dad745e48e2041dce8c19745435 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:08:52 +0800 Subject: [PATCH 03/13] chore: upload indexnow/bing files, #55 --- docs/public/BingSiteAuth.xml | 4 ++++ docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt | 1 + 2 files changed, 5 insertions(+) create mode 100644 docs/public/BingSiteAuth.xml create mode 100644 docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt diff --git a/docs/public/BingSiteAuth.xml b/docs/public/BingSiteAuth.xml new file mode 100644 index 00000000..8936a3ed --- /dev/null +++ b/docs/public/BingSiteAuth.xml @@ -0,0 +1,4 @@ + + + 4C3D05A873589B154B0C57BDD25B4F0E + \ No newline at end of file diff --git a/docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt b/docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt new file mode 100644 index 00000000..3a9c14b1 --- /dev/null +++ b/docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt @@ -0,0 +1 @@ +c3f887880bb64a66a4fbaf41814ecd0d \ No newline at end of file From c2f201ae5808e7330e5db3a463b9bfffa6ccbf7e Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:14:18 +0800 Subject: [PATCH 04/13] chore: upload yandex files, #55 --- docs/public/yandex_d5317dee77aad01d.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/public/yandex_d5317dee77aad01d.html diff --git a/docs/public/yandex_d5317dee77aad01d.html b/docs/public/yandex_d5317dee77aad01d.html new file mode 100644 index 00000000..4982e7a7 --- /dev/null +++ b/docs/public/yandex_d5317dee77aad01d.html @@ -0,0 +1,6 @@ + + + + + Verification: d5317dee77aad01d + \ No newline at end of file From 5e536a60f77243908c5be26cbc97bb3157498340 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:18:10 +0800 Subject: [PATCH 05/13] fix: create temp .en file on docker pull --- .github/workflows/pull-images.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull-images.yml b/.github/workflows/pull-images.yml index 1fcc43d7..b05db419 100644 --- a/.github/workflows/pull-images.yml +++ b/.github/workflows/pull-images.yml @@ -23,5 +23,8 @@ jobs: git checkout $LATEST_TAG echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV + - name: Create temporary env variables + run: cp docs/.env.example docs/.env + - name: Pull Development Image run: docker compose -f docker-compose.dev.yml pull From 3ca7db2dda52f750c13606e79ab0be73813e41b7 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:28:26 +0800 Subject: [PATCH 06/13] chore: add meta description and content-language --- .github/workflows/deploy-prod.yml | 2 +- README.md | 6 ++++++ docs/pages/post-installation/province-codes.mdx | 2 +- docs/theme.config.jsx | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 59f282ec..ee1f5ac4 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -72,7 +72,7 @@ jobs: docker-build-push: name: Development Image to Dockerhub if: github.event.release.target_commitish == 'main' && vars.DOCKERHUB_USERNAME != '' - needs: deploy-client + needs: lint-export-client runs-on: ubuntu-latest steps: - name: Login to Docker Hub diff --git a/README.md b/README.md index c9406634..584bb936 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ Usage with Docker is an alternate option to using Node directly from the [Usage] ### Use Pre-Built Development Docker Image +https://hub.docker.com/r/acaptutorials/acaptutorials.github.io + 1. Pull the development Docker image from Docker Hub using one of the options.
- `docker pull acaptutorials/acaptutorials.github.io:dev` - `docker compose -f docker-compose.dev.yml pull` (using Docker compose from the root project directory) @@ -139,11 +141,15 @@ Usage with Docker is an alternate option to using Node directly from the [Usage] This repository deploys the latest development Docker image `acaptutorials/acaptutorials.github.io:dev` to Docker Hub on the creation of new Tags/Releases with GitHub Actions. Supply the following GitHub Secrets and Variable to enable deployment to Docker Hub. It requires a Docker Hub account. +#### GitHub Secrets + | GitHub Secret | Description | | --- | --- | | DOCKERHUB_USERNAME | Docker Hub username | | DOCKERHUB_TOKEN | Deploy token for the Docker Hub account | +#### GitHub Variables + | GitHub Variable | Description | | --- | --- | | DOCKERHUB_USERNAME | Docker Hub username | diff --git a/docs/pages/post-installation/province-codes.mdx b/docs/pages/post-installation/province-codes.mdx index 138a7645..db02760e 100644 --- a/docs/pages/post-installation/province-codes.mdx +++ b/docs/pages/post-installation/province-codes.mdx @@ -2,7 +2,7 @@ import { Callout, FileTree, Steps } from 'nextra/components' # Province Codes -Province codes refer to the three-letter or two-letter shortcodes abbreviation for a province. For exampe Region 5 Bicol has: +Province codes refer to the three-letter or two-letter shortcodes abbreviation for a province. For example Region 5 Bicol has: | Province | Code | | --- | --- | diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index be1ff211..a9bbc165 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -30,7 +30,9 @@ export default { return ( <> + + ) } -} \ No newline at end of file +} From 3ae4e0cf6c4173e5370f0356a1a37da3960bf56b Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:43:58 +0800 Subject: [PATCH 07/13] chore: update meta description content --- docs/theme.config.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index a9bbc165..f6d23c97 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -23,21 +23,23 @@ export default { head: function Head () { const { asPath, defaultLocale, locale } = useRouter() const { frontMatter } = useConfig() - const title = 'ACAP Tutorials' const url = 'https://acaptutorials.github.io' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`) + const title = 'ACAP Tutorials' + const description = "The ACAP Tutorials website offers an organized and structured approach to documenting the software development approaches for the Agro-Climatic Advisory Portal (ACAP), a Climate Information Services (CIS) web application initially piloted in the Bicol region (ACAP Bicol)." + return ( <> - + From 44f22d7e76e43a94f598c0a9b037be14c64243ea Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 06:45:27 +0800 Subject: [PATCH 08/13] chore: update meta description content --- docs/theme.config.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index f6d23c97..fd6b8f71 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -28,7 +28,7 @@ export default { (defaultLocale === locale ? asPath : `/${locale}${asPath}`) const title = 'ACAP Tutorials' - const description = "The ACAP Tutorials website offers an organized and structured approach to documenting the software development approaches for the Agro-Climatic Advisory Portal (ACAP), a Climate Information Services (CIS) web application initially piloted in the Bicol region (ACAP Bicol)." + const description = "The ACAP Tutorials website offers an organized and structured software development documentation for the Agro-Climatic Advisory Portal (ACAP), a Climate Information Services (CIS) web application initially piloted in the Bicol region (ACAP Bicol)." return ( <> From baf637032bc67af9771a69f77ae02b188907f0ac Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 07:11:15 +0800 Subject: [PATCH 09/13] chore: update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 584bb936..475f38e9 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,10 @@ https://hub.docker.com/r/acaptutorials/acaptutorials.github.io This repository deploys the latest development Docker image `acaptutorials/acaptutorials.github.io:dev` to Docker Hub on the creation of new Tags/Releases with GitHub Actions. Supply the following GitHub Secrets and Variable to enable deployment to Docker Hub. It requires a Docker Hub account. +The Docker Hub image is available at: + +https://hub.docker.com/r/acaptutorials/acaptutorials.github.io + #### GitHub Secrets | GitHub Secret | Description | From b332d95d76a8d1b5965b06a09d5bb0ecfcd4b5d5 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Tue, 1 Oct 2024 07:14:06 +0800 Subject: [PATCH 10/13] chore: update README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 475f38e9..7343206d 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ The app depends these libraries and frameworks. - [Usage](#usage) - [Available Scripts](#available-scripts) - [Usage with Docker](#usage-with-docker) + - [Use Pre-Built Development Docker Image](#use-pre-Built-development-docker-image) + - [Build the Development Docker Image](#build-the-development-docker-image) - [Usage with GitHub Actions](#usage-with-gitHub-actions) - [Deployment to Docker Hub](#deployment-to-docker-hub) From c4f1d70e9974ff11766661bf936fd0c39c4653b6 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Wed, 2 Oct 2024 01:05:31 +0800 Subject: [PATCH 11/13] chore: rename dev image tag to latest, #54 --- docker-compose.dev.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 834af6ed..4f14683c 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,8 +1,8 @@ services: # NextJS v13 app running on development mode - acaptutorials.github.io-dev: - container_name: acaptutorials-docs-dev - image: acaptutorials/acaptutorials.github.io:dev + acaptutorials.github.io-latest: + container_name: acaptutorials-docs-latest + image: acaptutorials/acaptutorials.github.io:latest env_file: - ./docs/.env build: @@ -10,7 +10,7 @@ services: dockerfile: Dockerfile target: development networks: - - acaptutorials.github.io-dev + - acaptutorials.github.io-latest volumes: - ./docs:/opt/docs - /opt/docs/node_modules @@ -19,6 +19,6 @@ services: - "3000:3000" networks: - acaptutorials.github.io-dev: - name: acaptutorials.github.io-dev + acaptutorials.github.io-latest: + name: acaptutorials.github.io-latest external: false From b90ff13e656d40a3ac9771beb2a891890630fcec Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Wed, 2 Oct 2024 01:07:13 +0800 Subject: [PATCH 12/13] feat: pull development image every 2 months, #59 --- .github/workflows/pull-images.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull-images.yml b/.github/workflows/pull-images.yml index b05db419..02b85961 100644 --- a/.github/workflows/pull-images.yml +++ b/.github/workflows/pull-images.yml @@ -3,9 +3,8 @@ name: Pull Docker Images on: schedule: - - cron: '0 */2 * * *' # test Docker pull every 2 hrs # Runs "At 00:00 on day-of-month 1 in every 2nd month." - # - cron: '0 0 1 */2 *' + - cron: '0 0 1 */2 *' jobs: pull-images: From 5a2bd5ca7b59457c0143ede2d28a20a443590a29 Mon Sep 17 00:00:00 2001 From: acaptutorials Date: Wed, 2 Oct 2024 01:09:26 +0800 Subject: [PATCH 13/13] chore: update README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7343206d..d1bc8e2e 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Usage with Docker is an alternate option to using Node directly from the [Usage] https://hub.docker.com/r/acaptutorials/acaptutorials.github.io 1. Pull the development Docker image from Docker Hub using one of the options.
- - `docker pull acaptutorials/acaptutorials.github.io:dev` + - `docker pull acaptutorials/acaptutorials.github.io:latest` - `docker compose -f docker-compose.dev.yml pull` (using Docker compose from the root project directory) 2. Navigate to the project directory using the command line. Create a `.env` file inside the **/docs** directory with reference to the `.env.example` file. @@ -118,7 +118,7 @@ https://hub.docker.com/r/acaptutorials/acaptutorials.github.io `docker compose -f docker-compose.dev.yml up` 4. (Optional) Run the development Docker image (from other directories).
-`docker run -it --rm -p 3000:3000 acaptutorials/acaptutorials.github.io:dev` +`docker run -it --rm -p 3000:3000 acaptutorials/acaptutorials.github.io:latest` ### Build the Development Docker Image @@ -141,7 +141,7 @@ https://hub.docker.com/r/acaptutorials/acaptutorials.github.io ### Deployment to Docker Hub -This repository deploys the latest development Docker image `acaptutorials/acaptutorials.github.io:dev` to Docker Hub on the creation of new Tags/Releases with GitHub Actions. Supply the following GitHub Secrets and Variable to enable deployment to Docker Hub. It requires a Docker Hub account. +This repository deploys the latest development Docker image `acaptutorials/acaptutorials.github.io:latest` to Docker Hub on the creation of new Tags/Releases with GitHub Actions. Supply the following GitHub Secrets and Variable to enable deployment to Docker Hub. It requires a Docker Hub account. The Docker Hub image is available at: