This commit is contained in:
parent
71e905ebcb
commit
dc322584db
1 changed files with 6 additions and 13 deletions
|
|
@ -9,9 +9,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: docker.io/library/python:3.14-trixie
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Pipeline info
|
||||
run: |
|
||||
|
|
@ -21,24 +19,19 @@ jobs:
|
|||
run: |
|
||||
apt update
|
||||
apt -y install nodejs git rsync openssh-client
|
||||
pip install --upgrade pip
|
||||
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install -r docs_requirements.txt
|
||||
|
||||
- name: Build website - prod
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
mkdocs build
|
||||
pnpm build
|
||||
|
||||
- name: Build website - staging
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
sed -i "s#site_url: https://didays.de#site_url: https://staging.didays.de/pr${{ github.event.pull_request.number }}/#" mkdocs.yml
|
||||
mkdocs build
|
||||
#sed -i "s#site_url: https://didays.de#site_url: https://staging.didays.de/pr${{ github.event.pull_request.number }}/#" mkdocs.yml
|
||||
pnpm build
|
||||
|
||||
- name: Deploy - Prepare keys
|
||||
run: |
|
||||
|
|
@ -50,7 +43,7 @@ jobs:
|
|||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "Deploying to staging.didays.de/pr${{ github.event.pull_request.number }}"
|
||||
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ didays-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/staging.didays.de/pr${{ github.event.pull_request.number }}/
|
||||
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" dist/ didays-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/staging.didays.de/pr${{ github.event.pull_request.number }}/
|
||||
|
||||
- name: Deploy - Add comment to PR with staging URL
|
||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
||||
|
|
@ -65,7 +58,7 @@ jobs:
|
|||
- name: Deploy - Upload to prod
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ didays-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/didays.de/
|
||||
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" dist/ didays-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/didays.de/
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: github.event_name == 'pull_request'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue