-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.26 KB
/
deploy_docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy mkdocs
on:
push:
branches:
- main
- soo-deploy-docs
# This is just for testing purposes and needs to be removed
# before merge
pull_request:
types:
- opened
- synchronize
env:
PYTHON_VERSION: "3.10"
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Pixi
uses: prefix-dev/[email protected]
with:
pixi-version: ${{ env.PIXI_version }}
cache: true
- name: Install repository
run: |
pixi install
- name: Build and deploy docs
run: |
git remote add gh-token "https://${{secrets.GH_TOKEN}}@github.com/NOAA-HES-Capstone/icedyno.git"
git fetch gh-token && git fetch gh-token gh-pages:gh-pages
pixi run mkdocs build
pixi run mkdocs gh-deploy --force --clean --verbose --remote-name gh-pages