We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
untested snippet for CICD.
this compares the previous sitemap to the one you just generated. If it's different, it posts a discussion to discourse.
# generate site first. # compare new sitemap to old one. grep "<loc>" public/sitemap.xml | sort > /tmp/new.txt curl https://nivenly.org/sitemap.xml | grep "<loc>" | sort > /tmp/old.txt new_post_url=$(sort /tmp/new.txt /tmp/old.txt | uniq -u) if [[ ! -z $new_post_url ]]; then # need changed filename to grab title new_file=$(git diff --name-only HEAD HEAD~1 | grep "content/en/blog") title=$(grep "title: " $new_file | head -n 1) # https://docs.discourse.org/#tag/Topics/operation/createTopicPostPM data='{"title":"'+"$title"+'",' data=$data+'"raw":"Discussion about: \"' + "$title" data=$data+ ' \" - ' data=$data+ "$new_post_url" data=$data+ '- automatically posted via github action.",' data=$data+'"caategory":"Blog Updates"', data=$data+'"embed_url":"'+"$new_post_url"+'"}' curl -x POST \ -H "Api-Key: $SECRET_DISCOURSE_KEY" \ -H "Api-Username: system" -d $data https://nivenly.discourse.org/posts.json fi
The text was updated successfully, but these errors were encountered:
(yes, this is probably vulnerable to injection)
Sorry, something went wrong.
No branches or pull requests
untested snippet for CICD.
this compares the previous sitemap to the one you just generated.
If it's different, it posts a discussion to discourse.
The text was updated successfully, but these errors were encountered: