Skip to content

v1.2.1-alpha.1 #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 1, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pull-images.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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.<br>
- `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.
Expand All @@ -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).<br>
`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

Expand All @@ -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 |
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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:
context: ./docs
dockerfile: Dockerfile
target: development
networks:
- acaptutorials.github.io-dev
- acaptutorials.github.io-latest
volumes:
- ./docs:/opt/docs
- /opt/docs/node_modules
Expand All @@ -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
2 changes: 1 addition & 1 deletion docs/pages/post-installation/province-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| --- | --- |
Expand Down
4 changes: 4 additions & 0 deletions docs/public/BingSiteAuth.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<users>
<user>4C3D05A873589B154B0C57BDD25B4F0E</user>
</users>
1 change: 1 addition & 0 deletions docs/public/c3f887880bb64a66a4fbaf41814ecd0d.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3f887880bb64a66a4fbaf41814ecd0d
1 change: 1 addition & 0 deletions docs/public/google5ed7810677ed88f2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: google5ed7810677ed88f2.html
40 changes: 40 additions & 0 deletions docs/public/sitemap.txt
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 6 additions & 0 deletions docs/public/yandex_d5317dee77aad01d.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>Verification: d5317dee77aad01d</body>
</html>
10 changes: 7 additions & 3 deletions docs/theme.config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<meta name="description" content={description} />
<meta name="keywords" content={`acap, acap tutorials, acap-tutorials, acap dev, acap dev tutorials, acap bicol, acap-bicol, acap 1.0, acap 2.0, acap requirements, acap installation, acap changelog, acap installation and setup, acap post-installation, acap checklist, acap security, acap security guidelines, acap folder structure, acap troubleshooting, acap references, acap firebase, acap-bicol, da, amia, department of agriculture, adoptation and mitigation initiative in agriculture, rfo5, bicol, regional field office 5, resilient agriculture, agro-climatic advisory portal, agro climatic advisory portal`} />
<meta http-equiv="content-language" content="en-gb" />
<meta property="og:url" content={url} />
<meta property="og:title" content={frontMatter.title || title} />
<meta
property="og:description"
content={frontMatter.description || 'Development notes'}
content={frontMatter.description || description}
/>
<meta property="og:site_name" content={title} />
<meta property="og:image" content={process.env.OPENGRAPH_IMAGE_URL} />
Expand Down Expand Up @@ -69,4 +73,4 @@ export default {
</span>
)
}
}
}
Loading