Edit by hello-binit deployed refs/heads/0.3 #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Deploy | |
run-name: Edit by ${{ github.actor }} deployed ${{ github.ref }} | |
on: | |
push: | |
branches: | |
- '*.*' | |
workflow_dispatch: | |
jobs: | |
Mkdocs-Mike-Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print out debug info | |
run: echo "Repo ${{ github.repository }} | Branch ${{ github.ref }} | Runner ${{ runner.os }} | Event ${{ github.event_name }}" | |
- name: Check out docs repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Checkout patch (https://github.com/actions/checkout/issues/994) | |
run: git submodule foreach 'git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch origin' | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Git submodule update | |
run: | | |
git submodule update --remote --recursive | |
- name: Commit submodule update (if any) | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit" | |
- name: Setup Python3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Pip dependencies | |
run: python3 -m pip install -r ./requirements.txt | |
- name: Save Mike version | |
run: echo "mike_version=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV" | |
- name: Git pull | |
run: git pull | |
- name: Deploy with Mike | |
run: | | |
mike deploy --push $mike_version |