Update .github/workflows/docs.yml
This commit is contained in:
36
.github/workflows/docs.yml
vendored
36
.github/workflows/docs.yml
vendored
@@ -2,29 +2,33 @@ name: Deploy Gitea Pages
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [ main ]
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'mkdocs.yml'
|
- 'mkdocs.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python3 -m pip install mkdocs mkdocs-material
|
run: |
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get install -y -qq python3-pip
|
||||||
|
pip3 install mkdocs mkdocs-material
|
||||||
|
|
||||||
- run: mkdocs build
|
- run: mkdocs build
|
||||||
|
|
||||||
- name: Deploy to Gitea Pages
|
- name: Deploy to Gitea Pages
|
||||||
run: |
|
run: |
|
||||||
cd site
|
cd site
|
||||||
git init
|
git init
|
||||||
git config user.name "gitea-actions"
|
git config user.name "gitea-actions"
|
||||||
git config user.email "actions@forteapps.net"
|
git config user.email "actions@forteapps.net"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Deploy docs"
|
git commit -m "Deploy docs"
|
||||||
git push --force "https://x-token:${{ secrets.PAGES_TOKEN }}@git.forteapps.net/Forte/launchpad.git" HEAD:gitea-pages
|
git push --force "https://x-token:${{ secrets.PAGES_TOKEN }}@git.forteapps.net/Forte/launchpad.git" HEAD:gitea-pages
|
||||||
|
|||||||
Reference in New Issue
Block a user