diff --git a/.travis.yml b/.travis.yml index 88adb0d..abbdafc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,12 @@ +os: linux +dist: focal language: python - services: - docker stages: - test - - name: "BuildTest" - if: branch = test - - name: "Build&Publish" + - name: "release" if: branch = master jobs: @@ -20,27 +19,24 @@ jobs: script: - mkdocs build - - stage: "BuildTest" - name: "BuildTest" + - stage: "publish" + name: "publish" if: type = push - before_script: - - echo $dockerpass | docker login -u $dockeruser --password-stdin + env: + - IMAGE=pivpn/docs + before_install: + - apt update + - apt install -y curl + - curl -fsSL https://deb.nodesource.com/setup_17.x | bash - + - apt-get install -y nodejs install: - pip install mkdocs-material - script: - - mkdocs build - - docker build -t $prrepo:$tag . - - docker push $prrepo:$tag - - - - stage: "Build&Publish" - name: "Build&Deploy" - if: type = push + - npm install @semantic-release/github -D + - npm install @semantic-release/changelog -D + - npm install @semantic-release-plus/docker -D before_script: - - echo $dockerpass | docker login -u $dockeruser --password-stdin - install: - - pip install mkdocs-material + - echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin script: - - mkdocs build - - docker build -t $docsrepo:$tag . - - docker push $docsrepo:$tag + - docker build -t $IMAGE . + - npx semantic-release + diff --git a/README.md b/README.md index 1d0b0fa..631d4e7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ ![Pivpn Banner](docs/img/pivpnbanner.png) [![Build Status](https://travis-ci.com/pivpn/docs.svg?branch=master)](https://travis-ci.com/pivpn/docs) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) + ## Documentation & User Guides