summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/extract-data.yml9
-rw-r--r--scripts/get_internal_link_graph.go4
2 files changed, 10 insertions, 3 deletions
diff --git a/.github/workflows/extract-data.yml b/.github/workflows/extract-data.yml
index ab9fba67..f465fb8a 100644
--- a/.github/workflows/extract-data.yml
+++ b/.github/workflows/extract-data.yml
@@ -9,6 +9,11 @@ on:
- 'scripts/*.go'
workflow_dispatch:
+# Prevent concurrent runs to avoid conflicts
+concurrency:
+ group: data-extraction
+ cancel-in-progress: true
+
jobs:
extract-highlights:
name: Extract Highlights
@@ -34,6 +39,7 @@ jobs:
generate-external-link-rank:
name: Generate External Link Rank
runs-on: ubuntu-latest
+ needs: extract-highlights
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -55,6 +61,7 @@ jobs:
generate-link-graph:
name: Generate Internal Link Graph
runs-on: ubuntu-latest
+ needs: generate-external-link-rank
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -71,4 +78,4 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: update internal link graph data'
- file_pattern: 'public/link-graph.json'
+ file_pattern: 'static/link-graph.json'
diff --git a/scripts/get_internal_link_graph.go b/scripts/get_internal_link_graph.go
index 2f7c8b12..8adf5594 100644
--- a/scripts/get_internal_link_graph.go
+++ b/scripts/get_internal_link_graph.go
@@ -77,13 +77,13 @@ func main() {
nodeList = append(nodeList, nodes[k])
}
- os.MkdirAll("public", os.ModePerm)
+ os.MkdirAll("static", os.ModePerm)
output := map[string]interface{}{
"nodes": nodeList,
"edges": edges,
}
- outfile := "public/link-graph.json"
+ outfile := "static/link-graph.json"
f, err := os.Create(outfile)
if err != nil {
fmt.Println("create file error:", err)