Skip to content

Commit

Permalink
fix: build action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
9bow authored Jan 11, 2024
1 parent 6212b59 commit 8fe2d1f
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ on:

jobs:
build:

name: Build & Deploy docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy using mkdocs gh-deploy
run: |
git config --global user.name "GitHub Action"
git config --global user.email "reserve.dev@gmail.com"
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@github.com/$GITHUB_REPOSITORY
mkdocs gh-deploy -c -m "Rebuild"
- name: Checkout latest codes
uses: actions/checkout@v2

# refer: https://github.com/marketplace/actions/deploy-mkdocs
- name: Build & Deploy using mkdocs-deploy Action
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yml
EXTRA_PACKAGES: build-base
REQUIREMENTS: requirements.txt

0 comments on commit 8fe2d1f

Please sign in to comment.