# Dev Ops
# Serverless Framework
# AWS CodePipeLine
# GitHub Actions
GitHub Actions provide an easy way to automate software workflows. You can write actions yourself, but it is also possible to make use of actions written by other developers. Thousands of actions, able to be used for free, can be found on the GitHub Marketplace.
Cloudbash makes use of GitHub Actions to build and deploy the documentation website to GitHub Pages, GitHub's free static web host. The action used is called actions-gh-pages and was created by peaceiris.
GitHub actions are defined inside workflows, written in YAML files, and need to be placed in the .github/workflows folder at the root of the project. Workflows can be triggered after several different events; we have chosen to run this workflow after every push to the developer branch.
name: github pages
on:
push:
paths:
- "**/documentation/**"
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: |
cd documentation
npm ci
npm run docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/docs/.vuepress/dist