├── .github └── workflows │ ├── artefact.yml │ └── githubpage.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── action.yml ├── couscous.yml └── entrypoint.sh /.github/workflows/artefact.yml: -------------------------------------------------------------------------------- 1 | name: Couscous Artefact 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-18.04 11 | steps: 12 | - uses: actions/checkout@v1 13 | 14 | - uses: ./ 15 | - name: Upload artifact 16 | uses: actions/upload-artifact@v1.0.0 17 | with: 18 | # Artifact name 19 | name: Couscous 20 | # Directory containing files to upload 21 | path: .couscous/generated 22 | -------------------------------------------------------------------------------- /.github/workflows/githubpage.yml: -------------------------------------------------------------------------------- 1 | name: Couscous GithubPage 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-18.04 11 | steps: 12 | - uses: actions/checkout@v1 13 | 14 | - uses: ./ 15 | - name: Deploy 16 | uses: peaceiris/actions-gh-pages@v3 17 | with: 18 | github_token: ${{ secrets.GITHUB_TOKEN }} 19 | publish_dir: ./.couscous/generated -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .couscous/ -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM composer 3 | 4 | RUN composer global require couscous/couscous 5 | 6 | ADD entrypoint.sh /entrypoint.sh 7 | RUN chmod +x /entrypoint.sh 8 | ENTRYPOINT ["/entrypoint.sh"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Bilel Jegham 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Couscous - Github Action 2 | === 3 | [![release](https://img.shields.io/github/release/CouscousPHP/GitHub-Action.svg)](https://github.com/CouscousPHP/GitHub-Action/releases/latest) 4 | [![license](https://img.shields.io/github/license/CouscousPHP/GitHub-Action.svg)](https://github.com/CouscousPHP/GitHub-Action/blob/master/LICENSE) 5 | 6 | ![Couscous Artefact](https://github.com/CouscousPHP/GitHub-Action/workflows/Couscous%20Artefact/badge.svg) 7 | ![Couscous GithubPage](https://github.com/CouscousPHP/GitHub-Action/workflows/Couscous%20GithubPage/badge.svg) 8 | 9 | Couscous turns Markdown documentation into websites. http://couscous.io/ 10 | 11 | This is a GitHub Action to generate couscous websites. View : https://couscousphp.github.io/GitHub-Action/ 12 | 13 | 14 | ## Getting started 15 | 16 | Add your workflow file, the following step 17 | ```yml 18 | - uses: CouscousPHP/GitHub-Action@v1 19 | ``` 20 | 21 | ## Examples 22 | 23 | ### Publish on GithubPage 24 | 25 | ```yml 26 | name: Couscous GithubPage 27 | 28 | on: 29 | push: 30 | branches: 31 | - master 32 | 33 | jobs: 34 | deploy: 35 | runs-on: ubuntu-18.04 36 | steps: 37 | - uses: actions/checkout@v1 38 | 39 | - uses: CouscousPHP/GitHub-Action@v1 40 | - name: Deploy 41 | uses: peaceiris/actions-gh-pages@v3 42 | with: 43 | github_token: ${{ secrets.GITHUB_TOKEN }} 44 | publish_dir: ./.couscous/generated 45 | ``` 46 | 47 | 48 | 49 | ### Artefact zip 50 | Generate zip artefact with the generate website. 51 | ```yml 52 | name: Couscous Artefact 53 | 54 | on: 55 | push: 56 | branches: 57 | - master 58 | 59 | jobs: 60 | deploy: 61 | runs-on: ubuntu-18.04 62 | steps: 63 | - uses: actions/checkout@v1 64 | 65 | - uses: CouscousPHP/GitHub-Action@v1 66 | 67 | - name: Upload artifact 68 | uses: actions/upload-artifact@v1.0.0 69 | with: 70 | # Artifact name 71 | name: Couscous 72 | # Directory containing files to upload 73 | path: .couscous/generated 74 | 75 | ``` 76 | 77 | ## License 78 | Couscous is released under the MIT License. 79 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "Couscous Generate" 2 | description: "generate couscous.io docs" 3 | author: "CouscousPHP" 4 | 5 | runs: 6 | using: "docker" 7 | image: "Dockerfile" 8 | 9 | branding: 10 | icon: "book-open" 11 | color: "yellow" -------------------------------------------------------------------------------- /couscous.yml: -------------------------------------------------------------------------------- 1 | template: 2 | # Name of the directory containing the website template (default is "website") 3 | directory: website 4 | # Or if you are using a remote template, you can set the Git URL 5 | url: https://github.com/CouscousPHP/Template-Light.git 6 | index: ../README.md 7 | 8 | 9 | # Any variable you put in this file is also available in the Twig layouts: 10 | title: Github Action for Couscous 11 | subTitle: Couscous is good. 12 | 13 | baseUrl: https://couscousphp.github.io/GitHub-Action/ 14 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -l 2 | 3 | sh -c "/tmp/vendor/couscous/couscous/bin/couscous generate" --------------------------------------------------------------------------------