From 5d209c7ec8c0d94d0793bab5fdfd73b7ccf0e00e Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Thu, 25 Apr 2024 01:41:13 +0530 Subject: [PATCH] docs: Update and add steps for node CI (#19858) --- content/language/nodejs/configure-ci-cd.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/language/nodejs/configure-ci-cd.md b/content/language/nodejs/configure-ci-cd.md index 126ad8aa20..6133f1dc55 100644 --- a/content/language/nodejs/configure-ci-cd.md +++ b/content/language/nodejs/configure-ci-cd.md @@ -29,9 +29,9 @@ Create a GitHub repository, configure the Docker Hub secrets, and push your sour 4. Create a new [Personal Access Token (PAT)](/security/for-developers/access-tokens/#create-an-access-token) for Docker Hub. You - can name this token `node-docker`. + can name this token `node-docker`. Make sure access permissions include Read and Write. -5. Add the PAT as a second secret in your GitHub repository, with the name +5. Add the PAT as a second **Repository secrets** in your GitHub repository, with the name `DOCKERHUB_TOKEN`. 6. In your local repository on your machine, run the following command to change @@ -43,9 +43,11 @@ Create a GitHub repository, configure the Docker Hub secrets, and push your sour $ git remote set-url origin https://github.com/your-username/your-repository.git ``` -7. Run the following command to push your local repository to GitHub. +7. Run the following commands to stage, commit, and push your local repository to GitHub. ```console + $ git add -A + $ git commit -m "my commit" $ git push -u origin main ``` @@ -104,6 +106,8 @@ to Docker Hub. tags: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest ``` + If your Dockerfile is in a different directory, update the `context` with the path to the directory containing the Dockerfile. + For more information about the YAML syntax used here, see [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions). ## Step three: Run the workflow @@ -136,4 +140,4 @@ Related information: Next, learn how you can locally test and debug your workloads on Kubernetes before deploying. -{{< button text="Develop using Kubernetes" url="./deploy.md" >}} \ No newline at end of file +{{< button text="Test your deployment" url="./deploy.md" >}} \ No newline at end of file