Skip to content

Commit

Permalink
Merge pull request #6 from koriym/config
Browse files Browse the repository at this point in the history
Support config and profile option
  • Loading branch information
koriym authored Nov 17, 2021
2 parents 6fe573a + 6c59df0 commit a01dc42
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/asd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "ASD documents"

on:
["push", "workflow_dispatch"]

jobs:
asd:
runs-on: ubuntu-latest
name: ASD documents
steps:
# このリポジトリのプライベートアクションを使用するには
# リポジトリをチェックアウトする
- name: Checkout
uses: actions/checkout@v2

- name: Generates ASD documents
uses: ./ # Uses an action in the root directory

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./asd-public
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
uses: koriym/asd-action@v1
id: asd
with:
config: profile.xml
config: asd.xml
profile: profile.xml
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ branding:
inputs:
config:
description: Config file
required: true
required: false
profile:
description: Profile file
required: false
default: profile.xml
runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.config }}
- ${{ inputs.profile }}
5 changes: 5 additions & 0 deletions asd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<asd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://koriym.github.io/app-state-diagram/asd.xsd">
<watch>false</watch>
</asd>
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

composer require koriym/app-state-diagram
mkdir asd-public
mv $1 asd-public/$1
./vendor/bin/asd --config= asd-public/$1
mv $2 asd-public/$(basename $2)
./vendor/bin/asd --config=$1 asd-public/$(basename $2)
44 changes: 44 additions & 0 deletions profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<alps
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://alps-io.github.io/schemas/alps.xsd">
<title>ALPS Blog</title>
<doc>An ALPS profile example for ASD</doc>
<link href="https://github.com/koriym/app-state-diagram/issues" rel="issue"/>

<!-- Ontology -->
<descriptor id="id" def="https://schema.org/identifier" title="identifier"/>
<descriptor id="articleBody" def="https://schema.org/articleBody" title="article body"/>
<descriptor id="dateCreated" def="https://schema.org/dateCreated" title="create date"/>

<!-- Taxonomy -->
<descriptor id="Index" title="Home">
<descriptor href="#goBlog"/>
</descriptor>
<descriptor id="About" title="About Us">
<descriptor href="#goBlog"/>
</descriptor>
<descriptor id="Blog" def="https://schema.org/Blog" title="Blog Post List" tag="collection">
<descriptor href="#goAbout"/>
<descriptor href="#doPost"/>
<descriptor href="#goBlogPosting"/>
<descriptor href="#BlogPosting"/>
</descriptor>
<descriptor id="BlogPosting" def="https://schema.org/BlogPosting" title="Blog Post" tag="item">
<descriptor href="#id"/>
<descriptor href="#dateCreated"/>
<descriptor href="#articleBody"/>
<descriptor href="#goBlog"/>
</descriptor>

<!-- Choreography -->
<descriptor id="goStart" type="safe" rt="#Blog" rel="collection" title="Go to Home"/>
<descriptor id="goAbout" type="safe" rt="#About" title="Go to About"/>
<descriptor id="goBlog" type="safe" rt="#Blog" rel="collection" title="See the blog post list"/>
<descriptor id="goBlogPosting" type="safe" rel="item" rt="#BlogPosting" title="See the blog post">
<descriptor href="#id"/>
</descriptor>
<descriptor id="doPost" def="https://activitystrea.ms/specs/json/1.0/#post-verb" type="unsafe" rel="collection" rt="#Blog" title="Post the article">
<descriptor href="#articleBody"/>
</descriptor>
</alps>

0 comments on commit a01dc42

Please sign in to comment.