Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy docs workflow #5

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy mkdocs

on:
push:
branches:
- main

env:
PYTHON_VERSION: "3.10"
PIXI_VERSION: "v0.12.0"

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 }}
SooluThomas marked this conversation as resolved.
Show resolved Hide resolved
cache: true

- name: Install repository
run: |
pixi install

- name: Build and deploy docs
run: |
git remote add gh-token "https://SooluThomas:${{ 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-token
Loading