add OP5.3 material_pigment_production_details #13
Workflow file for this run
This file contains hidden or 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: Deploy Docs to GitHub Pages | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install MkDocs and Mike | |
| run: | | |
| pip install mkdocs-material mike | |
| - name: Install additional plugins | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Install Playwright for PDF generation | |
| run: | | |
| playwright install --with-deps chromium | |
| - name: build MkDocs | |
| run: | | |
| mkdocs build -f ./mkdocs.yml --clean | |
| - name: Save versioned PDF to repository | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| mkdir -p exports/pdf | |
| if [ -f "site/pdf/TerraLID_Metadata_Profile.pdf" ]; then | |
| cp "site/pdf/TerraLID_Metadata_Profile.pdf" "exports/pdf/TerraLID_Metadata_Profile_${TAG}.pdf" | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add exports/pdf/ | |
| git commit -m "Add PDF export for version ${TAG}" || true | |
| git push origin HEAD:main || true | |
| fi | |
| - name: Determine Version | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| if [[ "$TAG" == "latest" ]]; then | |
| cd docs/ | |
| VERSION=$(mike list --config-file ../mkdocs.yml | grep '\[latest\]' | awk '{print $1}') | |
| cd .. | |
| else | |
| VERSION="$TAG" | |
| fi | |
| echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
| echo "Mike will deploy version: ${VERSION}" | |
| - name: conigure git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "terralid@bergbaumuseum.de" | |
| - name: Deploy Docs | |
| run: | | |
| cd docs | |
| mike deploy --push --config-file ../mkdocs.yml --update-aliases ${{ env.VERSION }} latest | |
| - name: Setup SSH and Auto-Deploy | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy_key | |
| chmod 600 ~/.ssh/deploy_key | |
| ssh-keyscan -H d-ws164.server.est1816.de >> ~/.ssh/known_hosts | |
| ssh -i ~/.ssh/deploy_key gh-terralid-deployer@d-ws164.server.est1816.de "" | |
| - name: Cleanup | |
| if: always() | |
| run: rm -f ~/.ssh/deploy_key |