Added Workflows for CI/CD using Github Actions and ( Contributing.md and Readme.md ) Changes (#4)
* Added build changes in github actions. Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Changed CI Config Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Changed CI Config Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Added Some CI changes. Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Added Env and file naming Changes. Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Minor edit in Readme.md. Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io> * Added minor change for Building image. Signed-off-by: Vedant Shrotria <vedant.shrotria@mayadata.io>
This commit is contained in:
parent
cb04a13e48
commit
9c7985d355
|
|
@ -1,10 +1,14 @@
|
|||
name: LitmusDocs-CI
|
||||
on:
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened ]
|
||||
types: [ opened, synchronize, reopened, edited ]
|
||||
paths:
|
||||
- '.github/workflows/dockerbuild.yml'
|
||||
- '.github/workflows/Pull_Request.yml'
|
||||
- 'website/**'
|
||||
|
||||
jobs:
|
||||
embedmd:
|
||||
embedmdCheck_and_linksVerification:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
|
|
@ -17,11 +21,16 @@ jobs:
|
|||
stable: 'false'
|
||||
go-version: '1.14.0'
|
||||
|
||||
- name: Links Verification
|
||||
run: |
|
||||
go get -u -v github.com/bmuschko/link-verifier
|
||||
link-verifier --dirs website,README.md --fail=false
|
||||
|
||||
- name: Installing and Running embedmed
|
||||
run: |
|
||||
sudo apt install boxes
|
||||
go get github.com/campoy/embedmd
|
||||
cd docs
|
||||
cd website/docs
|
||||
embedmd -w $(find *.md)
|
||||
continue-on-error: true
|
||||
|
||||
|
|
@ -36,7 +45,7 @@ jobs:
|
|||
output=$(git status -s)
|
||||
echo "$output" | boxes -d stone -p a2v1
|
||||
tput setaf 3; echo "Please follow the instructions to run embedmd:"
|
||||
tput setaf 3; echo "cd docs"
|
||||
tput setaf 3; echo "cd website/docs"
|
||||
tput setaf 3; echo "embedmd -w \$(find *.md)"
|
||||
tput setaf 6; echo "For more info visit https://github.com/litmuschaos/litmus-docs/blob/master/CONTRIBUTING.md"
|
||||
exit 1
|
||||
|
|
@ -44,3 +53,11 @@ jobs:
|
|||
tput setaf 2; echo "Nothing to embed"
|
||||
fi
|
||||
shell: sh
|
||||
|
||||
ci:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
run: docker build -t $GITHUB_REPOSITORY .
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
name: CD-Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/dockerbuild.yml'
|
||||
- '.github/workflows/Pull_Request.yml'
|
||||
- 'website/**'
|
||||
|
||||
jobs:
|
||||
cd:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Declare some variables
|
||||
id: vars
|
||||
shell: bash
|
||||
run: |
|
||||
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||
- name: Docker login
|
||||
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
|
||||
- name: Build and Push the Docker Image
|
||||
run: |
|
||||
docker build -t ${GITHUB_REPOSITORY}:${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }} .
|
||||
docker push ${GITHUB_REPOSITORY}:${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}
|
||||
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ FROM node:14.15.0 AS build-env
|
|||
WORKDIR /app/website
|
||||
|
||||
EXPOSE 3000 35729
|
||||
COPY ./website /app/website
|
||||
COPY . /app/
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
CMD ["npm", "start"]
|
||||
|
|
|
|||
54
README.md
54
README.md
|
|
@ -1,5 +1,6 @@
|
|||
<img src="https://camo.githubusercontent.com/953211f24c1c246f7017703f67b9779e4589bf76/68747470733a2f2f6c616e6473636170652e636e63662e696f2f6c6f676f732f6c69746d75732e737667" width="160" align="left">
|
||||
|
||||
Documentation pour le projet Litmus
|
||||
# Documentation for the Litmus Project
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus-docs?ref=badge_shield)
|
||||
[](https://slack.litmuschaos.io)
|
||||
|
|
@ -9,72 +10,76 @@ Documentation pour le projet Litmus
|
|||
[](https://github.com/litmuschaos/litmus-docs/pulls)
|
||||
[](https://twitter.com/LitmusChaos)
|
||||
[](https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw)
|
||||
[](https://github.com/litmuschaos/litmus-docs/pulls)
|
||||
[](https://github.com/litmuschaos/litmus-docs/pulls)
|
||||
[](https://github.com/litmuschaos/litmus-docs)
|
||||

|
||||
|
||||
#### _Read this in [other languages](translations/TRANSLATIONS.md)._
|
||||
|
||||
Une description détaillée de projet Docusaurus est disponible
|
||||
[ici](https://docusaurus.io/docs/en/installation.html).
|
||||
[FR](translations/README-fr.md)
|
||||
|
||||
## Pour les développeurs
|
||||
Additional details on the Docusaurus project can be found [here](https://docusaurus.io/docs/en/installation.html).
|
||||
|
||||
### Cloner le répertoire litmus-docs
|
||||
#
|
||||
|
||||
## For Developers
|
||||
|
||||
### Clone litmus-docs repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/litmuschaos/litmus-docs.git
|
||||
cd litmus-docs
|
||||
```
|
||||
|
||||
Le serveur de site web documentaire peut être configuré manuellement ou en utilisant docker compose
|
||||
The docs website server can be setup manually or through docker compose
|
||||
|
||||
## Utiliser les commandes embedmd avant de commiter les changements
|
||||
## Use embedmd command before commiting changes
|
||||
|
||||
Le code incorporé sera extrait du fichier à `URL`, qui peut être un chemin relatif vers un autre dans le fichier de système local( en utilisant les barres obliques comme spérateur de répertoire) ou une URL commençant par `http://` ou `https://.`
|
||||
The embedded code will be extracted from the file at `URL`, which can either be a relative path to a file in the local file system (using forward slashes as directory separator) or a URL starting with `http://` or `https://.`
|
||||
|
||||
_Installation:_
|
||||
|
||||
- Il faut bien vérfier que [golang](https://github.com/golang/go) est installé. On a juste besoin d'exécuter la commande ci-dessous pour installer embedmd.
|
||||
- Make sure you have [golang](https://github.com/golang/go) installed. We just need to run the following command to install embedmd.
|
||||
|
||||
```bash
|
||||
go get github.com/campoy/embedmd
|
||||
```
|
||||
|
||||
_Exécution embedmd (doît être faite avant de commiter les modifications):_
|
||||
_Run embedmd (needs to be done before commiting the changes):_
|
||||
|
||||
- Suivez les étapes ci-dessous(à partir de répertoire root) pour exécuter embedmd:
|
||||
- Follow the steps (from root directory) to run embedmd:
|
||||
|
||||
```bash
|
||||
cd docs
|
||||
cd website/docs
|
||||
embedmd -w $(find *.md)
|
||||
```
|
||||
_Vérifier la différence:_
|
||||
|
||||
- L'exécution de cette commmande `embedmd -d docs-name.md` révelera la différence entre le contenu de docs-name.md et le résultat de embedmd docs-name.md.
|
||||
_Check the difference:_
|
||||
|
||||
- Executing `embedmd -d docs-name.md` will display the difference between the contents of docs-name.md and the output of embedmd docs-name.md.
|
||||
|
||||
## La configuration manuelle
|
||||
## Manual Setup
|
||||
|
||||
### Installer Node.js
|
||||
### Install Node.js
|
||||
|
||||
```bash
|
||||
sudo apt-get install software-properties-common
|
||||
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
|
||||
```
|
||||
|
||||
### Télécharger la dérniére version Node.js
|
||||
### Get the latest Node.js package
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y nodejs
|
||||
```
|
||||
|
||||
### Installer Yarn
|
||||
### Install Yarn
|
||||
|
||||
```bash
|
||||
npm install -g yarn
|
||||
```
|
||||
|
||||
### Démarrer le serveur
|
||||
### Start the server
|
||||
|
||||
```bash
|
||||
cd website
|
||||
|
|
@ -82,26 +87,25 @@ yarn install
|
|||
yarn start
|
||||
```
|
||||
|
||||
## La configuration via Docker compose
|
||||
## Using Docker compose
|
||||
|
||||
### Installer docker compose
|
||||
### Install docker compose
|
||||
|
||||
```bash
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
```
|
||||
|
||||
### Démarrer le serveur
|
||||
### Run the server
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Browse local documentation
|
||||
|
||||
## Parcourir la documentation locale
|
||||
http://localhost:3000/docs/next/getstarted.html
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus-docs?ref=badge_large)
|
||||
|
|
|
|||
Loading…
Reference in New Issue