Skip to content

Commit

Permalink
Use Github Workflow Instead of Travis.org
Browse files Browse the repository at this point in the history
Since June 15th, 2021, the building on travis-ci is ceased.
Therefore, switch to Github actions, as it is good enough
for our use case.

REPOTMPL-179
  • Loading branch information
Roman Stoffel committed Aug 13, 2021
1 parent a5d7ae5 commit 4c7b800
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 48 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy Documentation

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Deploy to Github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./web_deploy
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
# Repository Templates for Bitbucket Server REST OpenAPI Specification
[![Build Status](https://travis-ci.org/mibexsoftware/repository-templates-rest-api.svg?branch=master)](https://travis-ci.org/mibexsoftware/repository-templates-rest-api)

## Steps to finish

1. Enable [Travis](https://docs.travis-ci.com/user/getting-started/#To-get-started-with-Travis-CI%3A) for your repository (**note**: you already have `.travis.yml` file)
2. [Create GitHub access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/); check `public_repo` on `Select scopes` section.
3. Use the token value as a value for [Travis environment variable](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings) with the name `GH_TOKEN`
4. Make a test commit to trigger CI: `git commit --allow-empty -m "Test Travis CI" && git push`
5. Wait until Travis build is finished. You can check progress by clicking on the `Build Status` badge at the top
6. If you did everything correct, https://mibexsoftware.github.io/repository-templates-rest-api/ will lead to your new docs
7. **[Optional]** You can setup [custom domain](https://help.github.com/articles/using-a-custom-domain-with-github-pages/) (just create `web/CNAME` file)
8. Start writing/editing your OpenAPI spec: check out [usage](#usage) section below
9. **[Optional]** If you document public API consider adding it into [APIs.guru](https://APIs.guru) directory using [this form](https://apis.guru/add-api/).
10. Delete this section :smile:

## Links

Expand Down Expand Up @@ -40,3 +26,6 @@
**TIP:** you can open `swagger-editor`, documentation and `swagger-ui` in parallel
5. Once you finish with the changes you can run tests using: `npm test`
6. Share you changes with the rest of the world by pushing to GitHub :smile:

### Deployment
1. Merging to master will trigger a Github workflow deploying the latest changes
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
},
"private": true,
"scripts": {
"deploy": "npm run build && deploy-to-gh-pages --update web_deploy",
"build": "node ./scripts/build.js",
"swagger": "swagger-repo",
"test": "swagger-repo validate",
"start": "gulp serve",
"deploy-branch": "node ./scripts/deploy-branch.js"
"start": "gulp serve"
},
"engines": {
"node" : "10.15.3"
Expand Down
16 changes: 0 additions & 16 deletions scripts/deploy-branch.js

This file was deleted.

0 comments on commit 4c7b800

Please sign in to comment.