From c2d2eb9078bf5d302f57c2b4be24ca427e44b375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 19 Jun 2024 15:31:47 -0300 Subject: [PATCH 1/6] Create dependabot.yml --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..da40ae3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'daily' + open-pull-requests-limit: 0 + target-branch: 'development' From 9bda346dc789a2458d4de36b812aeea056a7470b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Thu, 27 Jun 2024 18:05:07 -0300 Subject: [PATCH 2/6] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 2062bef..2d533e3 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,22 @@ taxa_page: # - - - panel:specimen-records ``` +### Lifecycle hooks (Experimental feature) + +The `onCreatePage` and `onSSRPageCreate` functions allow you to execute code at the time the taxa page is created. `onSSRPageCreate` will be executed only on the server side in SSR mode. To make use of them it is necessary to include them in a file object called `pages/otus.config.js`. Both functions accept `otu`, `taxon`, `route` and `router` objects as parameters. Since `onCreatePage` runs on Taxa page component, it is possible to use hooks like `onMounted` or `onBeforeMount` inside it + +```javascript +export default { + onSSRCreatePage: async ({ otu, taxon, route, router }) => { + // Your code here + }, + + onCreatePage: ({ otu, taxon, route, router }) => { + // Your code here + } +} +``` + ### External panels To add panels in Taxa pages, create a folder called `panels` in your `setup` branch, and inside it create another folder for your panel. For example: `panels/PanelTest` From 04e633915b54edf034862cdd9046d54ec4e1f53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 15 Oct 2024 18:18:40 -0300 Subject: [PATCH 3/6] Update and rename gh-pages.yml to deploy.yml --- .../workflows/{gh-pages.yml => deploy.yml} | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) rename .github/workflows/{gh-pages.yml => deploy.yml} (57%) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/deploy.yml similarity index 57% rename from .github/workflows/gh-pages.yml rename to .github/workflows/deploy.yml index 7382d05..689fe1f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/deploy.yml @@ -1,21 +1,22 @@ -name: public-build +name: Deploy to GitHub Pages on: push: - branches: [main, setup] + branches: + - main + - setup workflow_dispatch: jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: 'main' fetch-depth: 0 - - - uses: actions/checkout@v2 + + - uses: actions/checkout@v4 with: ref: 'setup' fetch-depth: 0 @@ -25,32 +26,44 @@ jobs: run: cp -r _setup/* . - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: '16' - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 id: npm-cache with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - name: Install dependencies run: npm ci - name: Build public view run: npm run build - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - target_branch: gh-pages - build_dir: dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: ./dist + + deploy: + needs: build + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 permissions: contents: write - From 966f85bba1043adade987508248fde543345ce5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 15 Oct 2024 18:36:55 -0300 Subject: [PATCH 4/6] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2d533e3..aed85aa 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,10 @@ TaxonPages software is in active development and changes are expected that will 1. Click on "Fork" button to create your own repository from this. 2. Uncheck `Copy the setup branch only` and press `Save` -3. After create your repo, go to `Settings > Pages`, on "Branch" select `gh-pages` and `/(root)`. Then press save -4. Open `router.yml` file and change `base_url` to the name of your repository. -5. After a couple of minutes, your public page should be available at `https://.github.io/` +3. After create your repo, go to `Settings > Pages`, on "Build and deployment - Source" select `GitHub Actions`. +4. Go to `Actions` tab and press `I understand my workflows, go ahead and enable them` button +5. Open `router.yml` file and change `base_url` to the name of your repository. +6. After a couple of minutes, your public page should be available at `https://.github.io/` ### Setup From e15842180fa1f0423bcc0c488bdc43b3fc82e22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Sat, 19 Oct 2024 22:12:35 -0300 Subject: [PATCH 5/6] Update taxa_page.yml.example --- config/taxa_page.yml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/config/taxa_page.yml.example b/config/taxa_page.yml.example index 2000e13..68c816c 100644 --- a/config/taxa_page.yml.example +++ b/config/taxa_page.yml.example @@ -10,4 +10,5 @@ taxa_page: - - panel:map - panel:descendants - panel:content + - panel:keys - panel:statistics From 0bf4eb5050e4df0d6bbd138addd908867bb640ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Thu, 24 Oct 2024 11:37:01 -0300 Subject: [PATCH 6/6] Update deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 689fe1f..5255203 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,7 +28,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: Cache dependencies uses: actions/cache@v4