2024-12-02 14:12:33 +01:00
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
2024-12-02 22:36:43 +01:00
|
|
|
if: github.event.repository.fork == false
|
2024-12-02 14:12:33 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-12-23 19:02:22 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2024-12-02 14:12:33 +01:00
|
|
|
- name: Configure Git Credentials
|
|
|
|
run: |
|
|
|
|
git config user.name github-actions[bot]
|
|
|
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
key: mkdocs-material-${{ env.cache_id }}
|
|
|
|
path: .cache
|
|
|
|
restore-keys: |
|
|
|
|
mkdocs-material-
|
2025-01-06 13:49:15 +01:00
|
|
|
- run: apt-get update && apt-get install -y pngquant rsync
|
2024-12-02 22:33:55 +01:00
|
|
|
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
2024-12-02 14:28:15 +01:00
|
|
|
- run: pip install -r requirements.txt
|
2025-01-06 13:41:10 +01:00
|
|
|
- run: mkdocs build
|
|
|
|
- name: Create private key
|
|
|
|
run: |
|
|
|
|
echo "${{ secrets.ACT_RUNNER_KEY }}" > /tmp/act_runner_key
|
|
|
|
chmod 600 /tmp/act_runner_key
|
|
|
|
- name: rsync public directory
|
|
|
|
run: |
|
|
|
|
/usr/bin/rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/site/* root@vps03.hadan-it.com:/opt/npm/webspace/stephan.hadan.de/
|
|
|
|
- run: echo "This job's status is ${{ job.status }}."
|
2024-12-02 22:33:55 +01:00
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|