diff --git a/.github/workflows/deploy-compodoc.yml b/.github/workflows/deploy-compodoc.yml new file mode 100644 index 0000000000..868a8b3ccb --- /dev/null +++ b/.github/workflows/deploy-compodoc.yml @@ -0,0 +1,22 @@ +name: Deploy Compodoc to GitHub Pages +on: + push: + branches: + - master + +jobs: + create-and-deploy-compodoc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + run: npm install @compodoc/compodoc + - name: Run compodoc + run: npm run compodoc + - name: Deploy on pages + uses: peaceiris/actions-gh-pages@v3.7.0-8 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: doc/compodoc + destination_dir: documentation + diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml new file mode 100644 index 0000000000..d1db1338ab --- /dev/null +++ b/.github/workflows/deploy-pr.yml @@ -0,0 +1,29 @@ +name: Deploy Aam-digital to GitHub Pages +on: pull_request + +jobs: + deploy-website: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + run: npm install + - name: Build deployment + run: npm run build -- --base-href=/ndb-core/deployments/${{ github.head_ref }}/ + - name: Deploy on pages + uses: peaceiris/actions-gh-pages@v3.7.0-8 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: dist/ + destination_dir: deployments/${{ github.head_ref }} + - name: Post comment on PR + env: + PR: ${{ github.ref }} + run: | + PR=${PR#refs/*/} + PR=${PR%/*} + curl -X POST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/Aam-Digital/ndb-core/issues/$PR/comments \ + -d '{"body":"Deployed to https://aam-digital.github.io/ndb-core/deployments/${{ github.head_ref }}"}' diff --git a/.github/workflows/remove_deployment.yml b/.github/workflows/remove_deployment.yml new file mode 100644 index 0000000000..fa7073d088 --- /dev/null +++ b/.github/workflows/remove_deployment.yml @@ -0,0 +1,27 @@ +name: Remove deployment from GitHub Pages +on: + pull_request: + types: [closed] + +jobs: + remove-deployment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: gh-pages + token: ${{ secrets.GITHUB_TOKEN }} + - name: Remove directory + run: | + [ -d deployments/${{ github.head_ref }} ] && rm -rf deployments/${{ github.head_ref }} + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "Remove Deployment Workflow" + git commit -m "Removed deployment for branch $${GITHUB_REF##*/}" -a + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + force: true + branch: gh-pages diff --git a/.travis.yml b/.travis.yml index 0e95180480..7daaca695f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,6 @@ script: after_script: - ./cc-test-reporter after-build --debug --exit-code $TRAVIS_TEST_RESULT -after_success: - - npm run compodoc deploy: - provider: script @@ -46,10 +44,3 @@ deploy: script: npx semantic-release on: all_branches: true - - provider: pages - skip_cleanup: true - local_dir: doc/compodoc - github_token: $GH_REPO_TOKEN - on: - all_branches: true - condition: ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} =~ ^(master|compodoc)$ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7876659a7a..f0ac3f318b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,12 +12,12 @@ we welcome any contributions to make this project better! ----- ## Get started -To get started, please have a look at our [Developer Documentation](https://aam-digital.github.io/ndb-core/additional-documentation/overview.html). +To get started, please have a look at our [Developer Documentation](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html). -1. Work through the [Tutorial](https://aam-digital.github.io/ndb-core/additional-documentation/tutorial.html). +1. Work through the [Tutorial](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/tutorial.html). * This walks you through the setup and basic understanding of the project and also gives an overview of the technologies and frameworks involved. * Feel free to skip over steps that seem trivial to you, we tried to make this very beginner friendly. -2. Check our workflow regarding pull requests: [How to contribute code](https://aam-digital.github.io/ndb-core/additional-documentation/how-to-guides/contribute-code-to-the-project.html) +2. Check our workflow regarding pull requests: [How to contribute code](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/how-to-guides/contribute-code-to-the-project.html) 3. Don't hesitate to ask questions! ## Get in touch diff --git a/README.md b/README.md index eea13fee35..b6a1ba6c0f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![Build Status](https://travis-ci.org/Aam-Digital/ndb-core.svg?branch=master)](https://travis-ci.org/Aam-Digital/ndb-core) [![Code Climate](https://codeclimate.com/github/Aam-Digital/ndb-core/badges/gpa.svg)](https://codeclimate.com/github/Aam-Digital/ndb-core) [![Test Coverage](https://api.codeclimate.com/v1/badges/4e4a7a6301064019b2c9/test_coverage)](https://codeclimate.com/github/Aam-Digital/ndb-core/test_coverage) -[![Guides](https://img.shields.io/badge/Tutorial%20%26%20Guides-12-blue)](https://aam-digital.github.io/ndb-core/additional-documentation/overview.html) -[![Doc CoverageDocs](https://aam-digital.github.io/ndb-core/images/coverage-badge-documentation.svg)](https://aam-digital.github.io/ndb-core/modules.html) +[![Guides](https://img.shields.io/badge/Tutorial%20%26%20Guides-12-blue)](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html) +[![Doc CoverageDocs](https://aam-digital.github.io/ndb-core/documentation/images/coverage-badge-documentation.svg)](https://aam-digital.github.io/ndb-core/documentation/modules.html) # Aam Digital @@ -11,7 +11,7 @@ Empowering NGOs' social workers with simple to use (database) software. > For more information about the software and a free demo system visit **[www.aam-digital.com](https://www.aam-digital.com)**. -> For more information about the code including guides see the separate **[Developer Documentation](http://aam-digital.github.io/ndb-core/additional-documentation/overview.html)** +> For more information about the code including guides see the separate **[Developer Documentation](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html)** ----- @@ -73,7 +73,7 @@ _docker/nginx_default.conf_ (for production server): 5. `npm run start` to run your local dev server and get started. ## Documentation -Our detailed [Developer Documentation](http://aam-digital.github.io/ndb-core/additional-documentation/overview.html) +Our detailed [Developer Documentation](https://aam-digital.github.io/ndb-core/documentation/additional-documentation/overview.html) provides tutorials, guides, concepts and an API reference. ## Code Style