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/.github/workflows/pull-images.yml b/.github/workflows/pull-images.yml new file mode 100644 index 00000000..02b85961 --- /dev/null +++ b/.github/workflows/pull-images.yml @@ -0,0 +1,29 @@ +# Pull the Docker images from Docker Hub on schedule +name: Pull Docker Images + +on: + schedule: + # 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: Create temporary env variables + run: cp docs/.env.example docs/.env + + - name: Pull Development Image + run: docker compose -f docker-compose.dev.yml pull diff --git a/README.md b/README.md index c9406634..d1bc8e2e 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) @@ -103,8 +105,10 @@ 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 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. @@ -114,7 +118,7 @@ Usage with Docker is an alternate option to using Node directly from the [Usage] `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 @@ -137,13 +141,21 @@ Usage with Docker is an alternate option to using Node directly from the [Usage] ### 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: + +https://hub.docker.com/r/acaptutorials/acaptutorials.github.io + +#### 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/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 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/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 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/ 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 diff --git a/docs/theme.config.jsx b/docs/theme.config.jsx index be1ff211..fd6b8f71 100644 --- a/docs/theme.config.jsx +++ b/docs/theme.config.jsx @@ -23,19 +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 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 ( <> + + @@ -69,4 +73,4 @@ export default { ) } -} \ No newline at end of file +}