-
Notifications
You must be signed in to change notification settings - Fork 0
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
GitAuto: Make our sitemap dynamic by automatically including each page on GitHub actions #169
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Committed the Check Run |
package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we run next-sitemap on our new github action workflow, I don't think we need next-sitemap in package.json to begin with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
package.json
Outdated
@@ -18,6 +18,7 @@ | |||
"@fortawesome/free-solid-svg-icons": "^6.7.1", | |||
"@fortawesome/react-fontawesome": "^0.2.0", | |||
"@intercom/messenger-js-sdk": "^0.0.11", | |||
"next-sitemap": "^3.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Install next-sitemap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You should install next-sitemap here
- Remove 1 space because it is not aligned
- You need a blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the latest version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the latest version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the LTS version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
- name: Install dependencies | ||
run: npm install | ||
|
||
run: npx next-sitemap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're wrong, don't need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
Remove an unnecessary blank line
name: Generate Sitemap | ||
|
||
on: | ||
push: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on pull request to main NOT on push to main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
Committed the Check Run |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check out to the branch NOT main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this working branch? MUST BE a working branch NOT main.
The error says:
Run git config --local user.name 'github-actions'
HEAD detached at pull/169/merge
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: package-lock.json
modified: package.json
no changes added to commit (use "git add" and/or "git commit -a")
No changes to commit
remote: Write access to repository not granted.
fatal: unable to access 'https://github.com/gitautoai/website/': The requested URL returned error: 403
Error: Process completed with exit code 128.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No must not be main. Must be the branch for this pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved your feedback! Looks good?
Resolves #167
What is the feature
Implement a dynamic sitemap generation process that automatically includes each page of the website using GitHub Actions. This ensures that the sitemap is always up-to-date with the latest pages without manual intervention.
Where / How to code and why
Add a GitHub Actions Workflow for Sitemap Generation:
.github/workflows/generate-sitemap.yml
Use a Sitemap Generation Tool:
next-sitemap
or a custom script within the GitHub Actions workflow to scan the project's pages and generate thesitemap.xml
file.Commit and Push the Updated Sitemap:
sitemap.xml
back to the repository, preferably to themain
branch or the branch being deployed.sitemap.xml
is always part of the repository allows deployment processes to include the updated sitemap automatically.Update the Deployment Process if Necessary:
.github/workflows/
if the sitemap needs to be part of the deployment artifacts.Ensure Proper Permissions for GitHub Actions:
Migration Guide:
Anything the issuer needs to do
No action required.
Test these changes locally