-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_comments.yaml.template
44 lines (42 loc) · 1.39 KB
/
generate_comments.yaml.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
on:
workflow_dispatch:
push:
branches:
- main
paths:
- _posts/**
jobs:
generate_giscus_discussion:
name: Generate a GitHub Discussion post for Giscus comments on the latest post
runs-on: ubuntu-latest
permissions:
discussions: write
contents: read
steps:
- env:
DEBIAN_FRONTEND: noninteractive
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cargo install rss_autogen_giscus --version "~0.2"
- name: Wait for site build to complete
uses: lewagon/[email protected]
with:
ref: main
check-name: "deploy"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- env:
# Link to the RSS feed that gets updated with the latest posts
WEBSITE_RSS_URL: https://team-role-org-testing.github.io/feed.xml
# Name of the category on GitHub discussions that the post should be made under
DISCUSSION_CATEGORY: Blogs
# The number of days to look backwards, checking if the post already exists. Limit is disabled if set to 0.
#LOOKBACK_DAYS: 7
# PAT for authentication
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set +e
rss_autogen_giscus
case $? in
"0" | "3") exit 0;;
*) exit $?;;
esac