Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github pages deployment #2

Merged
merged 7 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
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
25 changes: 25 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .github/workflows/test-deploy.yml
name: Test deployment

on:
pull_request:
branches:
- main

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
5 changes: 3 additions & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ const config: Config = {
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://www.opentripmodel.org",
url: "https://opentripmodel.github.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
baseUrl: "/documentation/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "opentripmodel", // Usually your GitHub org/user name.
projectName: "documentation", // Usually your repo name.
deploymentBranch: "main",

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
Expand Down
3 changes: 3 additions & 0 deletions src/pages/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:::info
OAS still has to be added.
:::
132 changes: 132 additions & 0 deletions static/data/trip_with_actions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"id": "976eed42-bccc-4731-9d01-85ec3a16bd7b",
"status": "requested",
"actors": [
{
"entity": {
"id": "0d3198ad-2f2d-4aed-8c77-6d7779aefba3",
"name": "Shipping Company TM"
},
"roles": [
"shipper"
],
"associationType": "inline"
},
{
"entity": {
"id": "005cffff-4aba-4e2d-a79d-d428ba93ae8a",
"name": "Carrier Transport"
},
"roles": [
"carrier"
],
"associationType": "inline"
}
],
"actions": [
{
"entity": {
"id": "2664fb3c-9ce4-4a56-98d0-4ac76c2a40c4",
"lifecycle": "planned",
"sequenceNr": 0,
"location": {
"entity": {
"id": "5a71bd67-e51c-46d1-842b-5fa171c0eb08",
"name": "Location of distribution center Bananas Inc",
"geoReference": {
"lat": 1,
"lon": 0,
"type": "latLonPointGeoReference"
}
},
"associationType": "inline"
},
"actions": [
{
"entity": {
"id": "2a806c26-640c-4562-85d5-8ea4b9e7d80f",
"lifecycle": "planned",
"consignment": {
"entity": {
"id": "04a9870f-52c0-463a-80c1-7d1d81c8b38a",
"goods": [
{
"entity": {
"id": "db504c69-3769-4d70-9403-c870dabdbe4c",
"description": "Ordered box of Bananas",
"quantity": 2,
"type": "items"
},
"associationType": "inline"
}
]
},
"associationType": "inline"
},
"actionType": "load"
},
"associationType": "inline"
}
],
"constraint": {
"entity": {
"value": {
"startTime": "2021-03-25T10:00:00Z",
"endTime": "2021-03-25T11:00:00Z",
"type": "timeWindowConstraint"
}
},
"associationType": "inline"
},
"actionType": "stop"
},
"associationType": "inline"
},
{
"entity": {
"id": "b76c9a2d-15ed-49db-a654-1f8e1885d47d",
"lifecycle": "planned",
"sequenceNr": 1,
"location": {
"entity": {
"id": "306c1a89-fbd0-4dd8-a53d-b0671bba5973",
"name": "Location of store Fine Food groceries",
"geoReference": {
"lat": 1,
"lon": 0,
"type": "latLonPointGeoReference"
}
},
"associationType": "inline"
},
"actions": [
{
"entity": {
"id": "3af83c59-5550-4b92-88cf-06b750270134",
"lifecycle": "planned",
"consignment": {
"uuid": "04a9870f-52c0-463a-80c1-7d1d81c8b38a",
"entityType": "consignment",
"associationType": "reference"
},
"actionType": "unload"
},
"associationType": "inline"
}
],
"constraint": {
"entity": {
"value": {
"startTime": "2021-03-25T14:00:00Z",
"endTime": "2021-03-25T15:00:00Z",
"type": "timeWindowConstraint"
}
},
"associationType": "inline"
},
"actionType": "stop"
},
"associationType": "inline"
}
]
}
154 changes: 154 additions & 0 deletions static/data/trip_with_consignor_consignee.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"id": "976eed42-bccc-4731-9d01-85ec3a16bd7b",
"status": "requested",
"actors": [
{
"entity": {
"id": "0d3198ad-2f2d-4aed-8c77-6d7779aefba3",
"name": "Shipping Company TM"
},
"roles": [
"shipper"
],
"associationType": "inline"
},
{
"entity": {
"id": "005cffff-4aba-4e2d-a79d-d428ba93ae8a",
"name": "Carrier Transport"
},
"roles": [
"carrier"
],
"associationType": "inline"
}
],
"actions": [
{
"entity": {
"id": "2664fb3c-9ce4-4a56-98d0-4ac76c2a40c4",
"lifecycle": "planned",
"sequenceNr": 0,
"location": {
"entity": {
"id": "5a71bd67-e51c-46d1-842b-5fa171c0eb08",
"name": "Location of distribution center Bananas Inc",
"geoReference": {
"lat": 1,
"lon": 0,
"type": "latLonPointGeoReference"
}
},
"associationType": "inline"
},
"actions": [
{
"entity": {
"id": "2a806c26-640c-4562-85d5-8ea4b9e7d80f",
"lifecycle": "planned",
"consignment": {
"entity": {
"id": "04a9870f-52c0-463a-80c1-7d1d81c8b38a",
"goods": [
{
"entity": {
"id": "eb2e8f2a-b573-4d66-9d99-ff9235e10415",
"description": "Ordered box of Bananas",
"quantity": 2,
"type": "items"
},
"associationType": "inline"
}
],
"actors": [
{
"entity": {
"id": "a1c3c25b-f766-45b6-b09d-07005d565353",
"name": "Bananas Inc."
},
"roles": [
"consignor"
],
"associationType": "inline"
},
{
"entity": {
"id": "02724538-1022-46cc-8286-186154fc0b9b",
"name": "Fine Food groceries"
},
"roles": [
"consignee"
],
"associationType": "inline"
}
]
},
"associationType": "inline"
},
"actionType": "load"
},
"associationType": "inline"
}
],
"constraint": {
"entity": {
"value": {
"startTime": "2021-03-25T10:00:00Z",
"endTime": "2021-03-25T11:00:00Z",
"type": "timeWindowConstraint"
}
},
"associationType": "inline"
},
"actionType": "stop"
},
"associationType": "inline"
},
{
"entity": {
"id": "b76c9a2d-15ed-49db-a654-1f8e1885d47d",
"lifecycle": "planned",
"sequenceNr": 1,
"location": {
"entity": {
"id": "306c1a89-fbd0-4dd8-a53d-b0671bba5973",
"name": "Location of store Fine Food groceries",
"geoReference": {
"lat": 1,
"lon": 0,
"type": "latLonPointGeoReference"
}
},
"associationType": "inline"
},
"actions": [
{
"entity": {
"id": "3af83c59-5550-4b92-88cf-06b750270134",
"lifecycle": "planned",
"consignment": {
"uuid": "04a9870f-52c0-463a-80c1-7d1d81c8b38a",
"entityType": "consignment",
"associationType": "reference"
},
"actionType": "unload"
},
"associationType": "inline"
}
],
"constraint": {
"entity": {
"value": {
"startTime": "2021-03-25T14:00:00Z",
"endTime": "2021-03-25T15:00:00Z",
"type": "timeWindowConstraint"
}
},
"associationType": "inline"
},
"actionType": "stop"
},
"associationType": "inline"
}
]
}
Loading