-
-
Notifications
You must be signed in to change notification settings - Fork 16
77 lines (63 loc) · 2.47 KB
/
gh-deploy.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: "Deploy Environment"
on:
push:
branches: [ develop, main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v4
- name: Some check on branch
id: branch_check
run: |
echo "Running on branch ${{ github.ref }}"
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
echo "env_name=gh-pages" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then
echo "env_name=gh-pages-develop" >> $GITHUB_OUTPUT
else
echo "env_name=gh-pages-feature" >> $GITHUB_OUTPUT
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- name: Install requirements
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_MKDOCS }}
run: |
# Git Clone with GH
gh repo clone squidfunk/mkdocs-material-insiders
# Install
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
python3 -m pip install -U pip
python3 -m pip install -r requirements.txt
python3 -m pip install -e mkdocs-material-insiders
- name: Deploy mkdocs 🚀
run: python3 -m mkdocs gh-deploy --force --remote-branch ${{ steps.branch_check.outputs.env_name }}
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: '>=1.18.0'
# - name: Deploy Colabs from google-colab directory 🚀
# run: |
# # Create a claat files
# bash .github/workflows/scripts/claat.sh
# # Checkout on branch gh-pages-* depending on branch
# git checkout ${{ steps.branch_check.outputs.env_name }}
# # See actual branch
# echo "Running on branch $(git rev-parse --abbrev-ref HEAD)"
# # Git add folder google-colab excluding .md files
# git config --global user.name 'Codaqui Bot'
# git config --global user.email 'contato@codaqui.dev'
# git add google-colab -f --all -- ':!*.md'
# git commit -m "Update google-colab paths"
# git push --set-upstream origin ${{ steps.branch_check.outputs.env_name }}