Skip to content

Commit

Permalink
Merge pull request #11 from koriym/error
Browse files Browse the repository at this point in the history
CI suspended when ALPS is invalid
  • Loading branch information
koriym authored Nov 21, 2021
2 parents 04dfc81 + 9686f87 commit 279c804
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/error.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Error"

on:
["push", "workflow_dispatch"]

jobs:
asd:
runs-on: ubuntu-latest
name: ASD documents
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Error profile
id: asd
uses: ./ # Uses an action in the root directory
with:
profile: tests/profile/error.xml

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ steps.asd.outputs.dir}}
destination_dir: ${{ steps.asd.outputs.dir}}

9 changes: 7 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
composer require koriym/app-state-diagram
dirname=$(dirname $2)
./vendor/bin/asd --config=$1 $2
echo "Output Directory: $dirname"
echo "::set-output name=dir::$dirname"
if [ $? -ne "0" ]; then
echo "ASD error"
exit 1
else
echo "Output Directory: $dirname"
echo "::set-output name=dir::$dirname"
fi
11 changes: 11 additions & 0 deletions tests/profile/error.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?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>Error</title>

<!-- Ontology -->

<!-- Taxonomy -->
<descriptor href="#id" />
</alps>

0 comments on commit 279c804

Please sign in to comment.