update build workflow and config
This commit is contained in:
@@ -10,27 +10,22 @@ jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest-intranet
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Mkdocs build
|
||||
run: |
|
||||
python3 -m venv mkdocs_venv
|
||||
source mkdocs_venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
mkdocs build -d public
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
|
||||
- name: Push to gitea-pages branch
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Install mkdocs-material
|
||||
run: |
|
||||
git checkout --orphan gitea-pages
|
||||
git reset --hard
|
||||
ls -la
|
||||
cp -r ./public/* .
|
||||
git add .
|
||||
git commit -m "Deploy site"
|
||||
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
|
||||
apt-get update
|
||||
apt-get install -y pngquant
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Deploy documentation
|
||||
run: mkdocs gh-deploy --force -b gitea-pages
|
||||
|
||||
Reference in New Issue
Block a user