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