added develop build pipeline for preview builds
This commit is contained in:
parent
593bc7b773
commit
87c102fa14
1 changed files with 43 additions and 0 deletions
43
.github/workflows/develop.yml
vendored
Normal file
43
.github/workflows/develop.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: ci
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.fork == false
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- 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-
|
||||
- run: apt-get update && apt-get install -y pngquant rsync
|
||||
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
- run: pip install -r requirements.txt
|
||||
- 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:/data/webspace/stephan.preview.hadan.de/
|
||||
- run: echo "This job's status is ${{ job.status }}."
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue