-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(*): make automatic test deployments for each PR through CI (#483)
and build compodoc through GitHub Actions instead of Travis closes #411
- Loading branch information
1 parent
230c6b0
commit 7138b98
Showing
6 changed files
with
85 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: doc/compodoc | ||
destination_dir: documentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
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 }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 "[email protected]" | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters