From 1d217b0b6cb776826993e7dcaac8afdee4e02ae9 Mon Sep 17 00:00:00 2001 From: Sam Mohr Date: Tue, 7 Jan 2025 16:26:56 -0800 Subject: [PATCH 1/4] Generate docs locally to `basic-cli` --- .github/workflows/generate-docs.yaml | 33 ++++++++++++++++++++++++++++ README.md | 5 +---- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/generate-docs.yaml diff --git a/.github/workflows/generate-docs.yaml b/.github/workflows/generate-docs.yaml new file mode 100644 index 00000000..1eb7e635 --- /dev/null +++ b/.github/workflows/generate-docs.yaml @@ -0,0 +1,33 @@ +name: Generate docs + +on: + # Run when a release is published + release: + types: + - published + +jobs: + generate-docs: + name: Generate docs + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + steps: + - name: Check out the repository + uses: actions/checkout@v3 + - name: Install Roc + uses: hasnep/setup-roc@main + with: + roc-version: nightly + - name: Generate docs + run: roc docs platform/main.roc + - name: Fix absolute paths + run: | + find generated-docs/ -type f -name '*.html' -exec sed -i "s/\(href\|src\)=\"\//\1=\"\/${{ github.event.repository.name }}\//g" {} + + - name: Upload docs artifact + uses: actions/upload-pages-artifact@v1 + with: + path: generated-docs + - name: Deploy docs + uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/README.md b/README.md index b5932ddb..24203d68 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,7 @@ A Roc [platform](https://github.com/roc-lang/roc/wiki/Roc-concepts-explained#pla - [latest main branch](https://github.com/roc-lang/basic-cli/tree/main/examples) :book: **documentation**: - - [0.18.x](https://www.roc-lang.org/packages/basic-cli/0.18.0) - - [0.17.x](https://www.roc-lang.org/packages/basic-cli/0.17.0) - - [0.16.x](https://www.roc-lang.org/packages/basic-cli/0.16.0) - - [latest main branch](https://www.roc-lang.org/packages/basic-cli) + - [latest main branch](https://roc-lang.github.io/basic-cli/) ## Running locally From 92adbc6b327e6817e06a9c997be6ead754f6bb6f Mon Sep 17 00:00:00 2001 From: Sam Mohr Date: Wed, 8 Jan 2025 01:56:32 -0800 Subject: [PATCH 2/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 24203d68..76a2a543 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ A Roc [platform](https://github.com/roc-lang/roc/wiki/Roc-concepts-explained#pla - [latest main branch](https://github.com/roc-lang/basic-cli/tree/main/examples) :book: **documentation**: + - [0.18.x](https://roc-lang.github.io/basic-cli/0.18.0/) + - [0.17.x](https://roc-lang.github.io/basic-cli/0.17.0/) - [latest main branch](https://roc-lang.github.io/basic-cli/) ## Running locally From a30f5488cba28bd8c458b51ac53f1d7012bbd513 Mon Sep 17 00:00:00 2001 From: Luke Boswell Date: Wed, 8 Jan 2025 21:10:30 +1100 Subject: [PATCH 3/4] remove duplicate workflow --- .github/workflows/generate-docs.yaml | 33 ---------------------------- README.md | 10 ++++----- 2 files changed, 5 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/generate-docs.yaml diff --git a/.github/workflows/generate-docs.yaml b/.github/workflows/generate-docs.yaml deleted file mode 100644 index 1eb7e635..00000000 --- a/.github/workflows/generate-docs.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Generate docs - -on: - # Run when a release is published - release: - types: - - published - -jobs: - generate-docs: - name: Generate docs - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - steps: - - name: Check out the repository - uses: actions/checkout@v3 - - name: Install Roc - uses: hasnep/setup-roc@main - with: - roc-version: nightly - - name: Generate docs - run: roc docs platform/main.roc - - name: Fix absolute paths - run: | - find generated-docs/ -type f -name '*.html' -exec sed -i "s/\(href\|src\)=\"\//\1=\"\/${{ github.event.repository.name }}\//g" {} + - - name: Upload docs artifact - uses: actions/upload-pages-artifact@v1 - with: - path: generated-docs - - name: Deploy docs - uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/README.md b/README.md index 76a2a543..15eb6ea0 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ A Roc [platform](https://github.com/roc-lang/roc/wiki/Roc-concepts-explained#platform) to work with files, commands, HTTP, TCP, command line arguments,... :eyes: **examples**: - - [0.18.x](https://github.com/roc-lang/basic-cli/tree/0.18.0/examples) - - [0.17.x](https://github.com/roc-lang/basic-cli/tree/0.17.0/examples) - - [0.16.x](https://github.com/roc-lang/basic-cli/tree/0.16.0/examples) + - [0.18.0](https://github.com/roc-lang/basic-cli/tree/0.18.0/examples) + - [0.17.0](https://github.com/roc-lang/basic-cli/tree/0.17.0/examples) + - [0.16.0](https://github.com/roc-lang/basic-cli/tree/0.16.0/examples) - [latest main branch](https://github.com/roc-lang/basic-cli/tree/main/examples) :book: **documentation**: - - [0.18.x](https://roc-lang.github.io/basic-cli/0.18.0/) - - [0.17.x](https://roc-lang.github.io/basic-cli/0.17.0/) + - [0.18.0](https://roc-lang.github.io/basic-cli/0.18.0/) + - [0.17.0](https://roc-lang.github.io/basic-cli/0.17.0/) - [latest main branch](https://roc-lang.github.io/basic-cli/) ## Running locally From faa5b260ad18a5bb84187c9f28466b59565fd1fd Mon Sep 17 00:00:00 2001 From: Luke Boswell Date: Wed, 8 Jan 2025 21:11:36 +1100 Subject: [PATCH 4/4] remove latest docs, which no longer exists --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 15eb6ea0..493e77f2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ A Roc [platform](https://github.com/roc-lang/roc/wiki/Roc-concepts-explained#pla :book: **documentation**: - [0.18.0](https://roc-lang.github.io/basic-cli/0.18.0/) - [0.17.0](https://roc-lang.github.io/basic-cli/0.17.0/) - - [latest main branch](https://roc-lang.github.io/basic-cli/) ## Running locally