From 5745350b11d72d9fed4acda31669c1a9dad5a213 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Mar 2025 10:38:51 -0700 Subject: [PATCH 01/12] Create hugo.yml --- .github/workflows/hugo.yml | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/hugo.yml diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 00000000..a217f662 --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,74 @@ +# Sample workflow for building and deploying a Hugo site to GitHub Pages +name: Deploy Hugo site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +# Default to bash +defaults: + run: + shell: bash + +jobs: + # Build job + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.128.0 + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass + run: sudo snap install dart-sass + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache + HUGO_ENVIRONMENT: production + run: | + hugo \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 6ddb0a494803795a71f87514a36ad9c48da7a696 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 10:58:09 -0700 Subject: [PATCH 02/12] add text to en file --- content/about/_index.en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/about/_index.en.md b/content/about/_index.en.md index 79a77aa0..7e35851d 100644 --- a/content/about/_index.en.md +++ b/content/about/_index.en.md @@ -2,6 +2,6 @@ title: About --- -[Symbiota Docs](https://symbiota.org/docs) is a central repository for documentation regarding Symbiota-based data portals. This site is maintained by the Symbiota Support Hub, but all Symbiota users are encouraged to contribute. [Contact Us](https://biokic.github.io/symbiota-docs/contact/) to contribute or provide feedback on this site. +[Symbiota Docs v2!](https://symbiota.org/docs) is a central repository for documentation regarding Symbiota-based data portals. This site is maintained by the Symbiota Support Hub, but all Symbiota users are encouraged to contribute. [Contact Us](https://biokic.github.io/symbiota-docs/contact/) to contribute or provide feedback on this site. [Symbiota](https://symbiota.org/) is an open-source software for managing and mobilizing biodiversity data that serves over 2,000 natural history collections and publishes over 95 million occurrence (specimen or observation) records. Visit [Symbiota.org](https://symbiota.org/) to learn more. The core Symbiota code is developed at the Arizona State University Biodiversity Knowledge Integration Center. The central code for this version of Symbiota can be found in [GitHub](https://github.com/BioKIC/Symbiota). From 72d32ced73b4121923ba414600aa5903b9ad749e Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 11:22:11 -0700 Subject: [PATCH 03/12] change to v1 --- content/about/_index.en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/about/_index.en.md b/content/about/_index.en.md index 7e35851d..1fc8ffc6 100644 --- a/content/about/_index.en.md +++ b/content/about/_index.en.md @@ -2,6 +2,6 @@ title: About --- -[Symbiota Docs v2!](https://symbiota.org/docs) is a central repository for documentation regarding Symbiota-based data portals. This site is maintained by the Symbiota Support Hub, but all Symbiota users are encouraged to contribute. [Contact Us](https://biokic.github.io/symbiota-docs/contact/) to contribute or provide feedback on this site. +[Symbiota Docs v1](https://symbiota.org/docs) is a central repository for documentation regarding Symbiota-based data portals. This site is maintained by the Symbiota Support Hub, but all Symbiota users are encouraged to contribute. [Contact Us](https://biokic.github.io/symbiota-docs/contact/) to contribute or provide feedback on this site. [Symbiota](https://symbiota.org/) is an open-source software for managing and mobilizing biodiversity data that serves over 2,000 natural history collections and publishes over 95 million occurrence (specimen or observation) records. Visit [Symbiota.org](https://symbiota.org/) to learn more. The core Symbiota code is developed at the Arizona State University Biodiversity Knowledge Integration Center. The central code for this version of Symbiota can be found in [GitHub](https://github.com/BioKIC/Symbiota). From 8e2fa3df2d500faa7d34184389b6cbcef9612499 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 11:29:14 -0700 Subject: [PATCH 04/12] add new version links and change the workflow --- .github/workflows/hugo.yml | 2 +- config.toml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index a217f662..5259668e 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -4,7 +4,7 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["master"] + branches: ["master", "v2"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/config.toml b/config.toml index f5642b6b..7761bc9c 100644 --- a/config.toml +++ b/config.toml @@ -155,6 +155,24 @@ hasChildren = true url = "coll_manager" weight = 3 +# Dropdown menu +[[Languages.en.menu.main]] +weight = 8 +name = "Versions" +hasChildren = true + + [[Languages.en.menu.main]] + parent = "Versions" + name = "v1.0.0" + url = "v1" + weight = 4 + + [[Languages.en.menu.main]] + parent = "Versions" + name = "v2.0.0" + url = "v2" + weight = 1 + ################################ Spanish Language ###################### [Languages.es] languageName = "Es" From 813cf25e14908cd29d0c5c9c8747372d572254f6 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 11:38:55 -0700 Subject: [PATCH 05/12] change menu in config.toml --- config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 7761bc9c..d087e0c6 100644 --- a/config.toml +++ b/config.toml @@ -165,13 +165,13 @@ hasChildren = true parent = "Versions" name = "v1.0.0" url = "v1" - weight = 4 + weight = 1 [[Languages.en.menu.main]] parent = "Versions" name = "v2.0.0" url = "v2" - weight = 1 + weight = 2 ################################ Spanish Language ###################### [Languages.es] From 80e9d45e6121ce26a5101890cf964bc8efd0900d Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 11:48:36 -0700 Subject: [PATCH 06/12] try to see if this solves the different branches equals different page url issue --- .github/workflows/gh-pages.yml | 1 + config.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2957305f..596846b1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -27,3 +27,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./public + destination_dir: ${{ github.ref_name }} diff --git a/config.toml b/config.toml index d087e0c6..d389166b 100644 --- a/config.toml +++ b/config.toml @@ -164,7 +164,7 @@ hasChildren = true [[Languages.en.menu.main]] parent = "Versions" name = "v1.0.0" - url = "v1" + url = "master" weight = 1 [[Languages.en.menu.main]] From a5cfb4ee7ddec12a7ac1cf9e09954903f9d0092c Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 12:22:46 -0700 Subject: [PATCH 07/12] try adding v2 checkout to the steps instead of listening for v2 branch push --- .github/workflows/hugo.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 5259668e..2e0cb1c1 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -4,7 +4,7 @@ name: Deploy Hugo site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["master", "v2"] + branches: ["master"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -33,6 +33,12 @@ jobs: env: HUGO_VERSION: 0.128.0 steps: + - uses: actions/checkout@v2 + with: + ref: v2 + # Put the checked out files inside the `symbiota-docs/v2` folder + path: symbiota-docs/v2 + clean: false - name: Install Hugo CLI run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ From e61d0600ca5d4cf0f62171ee330c7833eebf1926 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 12:28:02 -0700 Subject: [PATCH 08/12] change base URL --- config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index d389166b..98e06ee3 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ ################################# Default configuration ################### # provide your domain here -baseURL = "https://biokic.github.io/symbiota-docs/" +baseURL = "https://atticus29.github.io/symbiota-docs/" # theme theme = "dot" # site title @@ -18,7 +18,7 @@ unsafe = true ############################# Default Parameters ########################## [params] -editURL = "https://github.com/BioKIC/symbiota-docs/edit/master/content/" +editURL = "https://github.com/atticus29/symbiota-docs/edit/master/content/" # logo is for all page logo = "" # logo white is for homepage logo, you can use colorful logo too... From 1de1a3d44f930cb9a99f0df7160d5e2f859a4969 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 12 Mar 2025 12:37:39 -0700 Subject: [PATCH 09/12] add v2 directory in case its absence is an issue --- config.toml | 2 +- v2/tmp.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 v2/tmp.txt diff --git a/config.toml b/config.toml index 98e06ee3..207405b1 100644 --- a/config.toml +++ b/config.toml @@ -157,7 +157,7 @@ hasChildren = true # Dropdown menu [[Languages.en.menu.main]] -weight = 8 +weight = 9 name = "Versions" hasChildren = true diff --git a/v2/tmp.txt b/v2/tmp.txt new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/v2/tmp.txt @@ -0,0 +1 @@ +test From 3f45b19d656e32beb0d745f1b3d503669e06f402 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 16 Jul 2025 10:32:17 -0700 Subject: [PATCH 10/12] try updating the ubuntu version --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 596846b1..325be4f8 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: From 100486adc59b6cca6acadede8cca19e64bee7569 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 16 Jul 2025 10:35:44 -0700 Subject: [PATCH 11/12] Revert "try updating the ubuntu version" This reverts commit 3f45b19d656e32beb0d745f1b3d503669e06f402. --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 325be4f8..596846b1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: From 6e6c835425c25f01872a3b66f2c4a72257408f86 Mon Sep 17 00:00:00 2001 From: atticus29 Date: Wed, 16 Jul 2025 10:36:18 -0700 Subject: [PATCH 12/12] update ubuntu version --- .github/workflows/gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 596846b1..325be4f8 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: