1 |
# This is a basic workflow to help you get started with Actions |
2 |
|
3 |
name: Deploy Docs |
4 |
|
5 |
# Controls when the workflow will run |
6 |
on: |
7 |
push: |
8 |
branches: [ main ] |
9 |
|
10 |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
11 |
jobs: |
12 |
# This workflow contains a single job called "build" |
13 |
docs-deploy: |
14 |
# The type of runner that the job will run on |
15 |
runs-on: ubuntu-latest |
16 |
|
17 |
# Steps represent a sequence of tasks that will be executed as part of the job |
18 |
steps: |
19 |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
20 |
- uses: actions/checkout@v3 |
21 |
- uses: actions/[email protected] |
22 |
- name: Install Mkdocs |
23 |
run: pip install mkdocs mkdocs-material |
24 |
|
25 |
- name: Set version |
26 |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
27 |
|
28 |
- name: Build docs |
29 |
run: mkdocs build |
30 |
|
31 |
- name: Deploy 🚀 |
32 |
uses: JamesIves/[email protected] |
33 |
with: |
34 |
branch: gh-pages # The branch the action should deploy to. |
35 |
folder: site # The folder the action should deploy. |