Skip to content

Commit

Permalink
base-mip-cmor-tables commit. Thu 10 Oct 2024
Browse files Browse the repository at this point in the history
Reverse Framing script example 


Create 404.html
Rename data_descriptors/variables/404.html to 404.html
Update 404.html
Create 404.html
Update 404.html
Update 404.html
schema

schema

schema

Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update _schema
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update _schema
Update 404.html
Update 404.html
Delete data_descriptors/variables/index.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
Update 404.html
renaming of the links

Update 404.html
Update 404.html
Update 404.html
Update _schema
keys - to _

Update _schema
Update _schema
tablelinks

product context

product context

product context

product context

product context

product context

Update README.md
Create cmip6plus.json
Update cmip6plus.json
Update cmip6plus.json
Create _context
Create cmip6.json
Update cmip6plus.json
adding project collections

adding project collections

rm project collections

development

Automated update of JSONLD files, DO NOT EDIT.

Create _context_
changes

development

development

development

development

development

development

development

development

development

development

development

development

development

development
  • Loading branch information
wolfiex committed Dec 2, 2024
1 parent 0e8f19d commit 8ed939b
Show file tree
Hide file tree
Showing 2,325 changed files with 280,043 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
Binary file added .github/.wiki/CMIP6plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions .github/.wiki/CMIP6plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/.wiki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A store of materials needed for the wiki
Binary file added .github/.wiki/cmip6plus600.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/.wiki/model_components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/.wiki/source_id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/ISSUE_TEMPLATE/.DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Other
about: Creating a general issue
title: 'Add a descriptive summary here.'
labels: ''
assignees: ''

---

# General Issue

Please provided a detailed outline of the problem, discussion or suggestion.

Make sure to provide the following where it might apply.

- [ ] Any relevant files or code snippets
- [ ] Where this occurs
Binary file added .github/workflows/.DS_Store
Binary file not shown.
131 changes: 131 additions & 0 deletions .github/workflows/disabled /publish2pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: publish_to_pages
on:
push:
branches:
- "main"
- "jsonld_IV"

# workflow_run:
# workflows: ["Build", "Test"] # List the names of the workflows it should wait for
# types:
# - completed # Trigger only when the specified workflows complete



jobs:
push2production:
runs-on: ubuntu-latest
env:
API_KEY: ${{ secrets.API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{ github.ref_name }}
permissions:
actions: write
checks: write
contents: write
deployments: write
id-token: write
packages: write
pages: write
pull-requests: write
repository-projects: write
statuses: write
steps:


- name: Get a list of directories with updated files
id: install-cmipld
uses: WCRP-CMIP/CMIP-LD/actions/cmipld@main

- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the complete commit history

- name: Set up Git
run: |
git config user.email "[email protected]"
git config user.name "Daniel Ellis"
git config credential.helper store
git config --global user.email "[email protected]"
git config --global user.name "Daniel Ellis"
git config --global push.default current
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
shell: bash

- name: create symbolic link without extension
id: push_to_production
run: |
# Check if production branch exists; if not, create an empty branch
if ! git show-ref --verify --quiet refs/heads/production; then
# Create an empty orphan branch named production
git checkout --orphan production
git rm -rf .
# curl command here
# echo "curl command here"
# touch 404.html
git checkout "${BRANCH}" -- 404.html
# Create a .nojekyll file to prevent GitHub Pages from processing with Jekyll
touch .nojekyll
git add .nojekyll
git commit -m "Add .nojekyll to production branch"
# # Make sure the publish workflow exists
# mkdir -p .github/workflows
# Check out the static.yml file from the source branch to the production branch
git checkout "${BRANCH}" -- .github/workflows/static.yml
else
git checkout production
rm -rf docs
fi
# Checkout the specified branch's data_descriptors directory into production
git checkout "${BRANCH}" -- data_descriptors
# mv data_descriptors docs
# copy the 404 code.
cp 404.html data_descriptors/404.html
cp .nojekyll data_descriptors/.nojekyll
# Find all .json files and create symbolic links without the .json extension
# return to copys as artifacts do not handle symlinks
find . -type f -name "*.json" -exec sh -c 'cp "$0" "${0%.json}"' {} \;
shell: bash


- name: Update ctx
id: update-ctx
shell: bash
run: |
update_ctx
continue-on-error: true

- name: Commit changes
id: commit
run: |
# Stage all changes, commit, and push to production branch
git add -A
git commit -m "production push"
git push --force origin production
shell: bash
# Stage all changes, commit, and push to production branch


# Trigger the second workflow using the GitHub Actions API
- name: Trigger Production Workflow
if: ${{ success() }} # Only trigger if previous steps were successful
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run static.yml --ref production
# curl -X POST -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer $GITHUB_TOKEN" \
# https://api.github.com/repos/${{ github.repository }}/actions/workflows/static.yml/dispatches \
# -d '{"ref":"production"}'
51 changes: 51 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy static content to Pages

on:
workflow_dispatch:
# Uncomment to trigger on push to the production branch as well
# push:
# branches:
# - "production"

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: production

- name: Setup Pages
uses: actions/configure-pages@v5

# - name: Pre-check files
# run: |
# for file in data_descriptors/*; do
# if [ ! -f "$file" ]; then
# echo "Error: $file does not exist."
# exit 1
# fi
# done

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'data_descriptors'
retention-days: 0

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
73 changes: 73 additions & 0 deletions .github/workflows/update-jsonld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Update JSONLD
on:
push:
# branches:
# - '*'
# - main # Adjust this to your branch name if different
branches-ignore:
- production

jobs:
update-jsonld:
runs-on: ubuntu-latest # Specify the machine type

steps:

- name: Get a list of directories with updated files
id: install-cmipld
uses: WCRP-CMIP/CMIP-LD/actions/cmipld@main

- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Get a list of directories with updated files
id: updated-dirs
uses: WCRP-CMIP/CMIP-LD/actions/updated-dirs@main
with:
filter_dir: "data_descriptors"

- name: Group JSONLD files
id: group-jsonld
uses: WCRP-CMIP/CMIP-LD/actions/process_jsonld@main
with:
dirs: ${{ env.updated_dirs }}
# frames: "$PWD/compiled/graph_data.json"


# - name: Run Update Scripts
# if: ${{ env.updated_dirs }}
# id: run-all-files
# uses: WCRP-CMIP/CMIP-LD/actions/run-all-files@main
# with:
# directory: "$PWD/JSONLD/scripts"
# script: python
# script_ext: .py


# - name: generate CV
# if: ${{ env.updated_dirs }}
# id: generate_cv
# run: |
# if [[ "${{env.updated_dirs}}" == *"JSONLD"* ]]; then
# gencv && git push origin HEAD
# fi

- name: Commit All
uses: WCRP-CMIP/CMIP-LD/actions/commit-all@main
with:
message: "Automated Content Update"

- name: Push Changes
run: |
git push
- name: Publish
uses: WCRP-CMIP/CMIP-LD/actions/publish2pages@main
with:
api_key: ${{ secrets.API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
branch_name: ${{ github.ref_name }}


27 changes: 27 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Load JSON Key Display</title>
<link rel='stylesheet' href='https://bootswatch.com/5/sketchy/bootstrap.css'>
<style>
body { padding:10px; }
h2 { font-size:0.8rem; margin-left: 10px }
h3 { font-size:0.6rem; margin-left: 15px ; color:gray }
p { margin-left: 30px }
pre {border: none; padding:40px}
ul {padding-left: 40px}
</style>
</head>
<body>
<h1 id='title'>Data Descriptor</h1>
<div>
<code id="content"></code>
</div>

<script src='https://wcrp-cmip.github.io/CMIP-LD/static/404_restful.js'>

</script>
</body>
</html>
Loading

0 comments on commit 8ed939b

Please sign in to comment.