chore: revert to existing docs deployment strategy

master
Boaz Poolman 2026-02-01 16:13:48 +01:00
parent a6f01078b0
commit 8c70ceb0f2
1 changed files with 37 additions and 25 deletions

View File

@ -7,34 +7,46 @@ on:
jobs: jobs:
deploy: deploy:
environment: name: Deploy
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: environment:
pages: write name: docs.pluginpal.io
id-token: write url: https://docs.pluginpal.io/config-sync
steps: steps:
- name: Checkout - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# 👇 Build steps
- name: Set up Node.js - name: Set up Docker
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: '14'
cache: yarn
- name: Install dependencies - name: Build a Docker image
run: cd docs && yarn install --frozen-lockfile --non-interactive run: |
- name: Build cd docs
run: cd docs && yarn build docker build \
# 👆 Build steps -t docs-config-sync:latest .
- name: Setup Pages docker save -o ../docs-config-sync-latest.tar docs-config-sync:latest
uses: actions/configure-pages@v4
- name: Upload artifact - name: Transfer the Docker image to the Dokku server
uses: actions/upload-pages-artifact@v4 uses: appleboy/scp-action@v0.1.3
with: with:
# 👇 Specify build output path host: ${{ secrets.SSH_HOST }}
path: docs/build username: ${{ secrets.SSH_CI_USERNAME }}
- name: Deploy to GitHub Pages password: ${{ secrets.SSH_CI_PASSWORD }}
id: deployment source: docs-config-sync-latest.tar
uses: actions/deploy-pages@v4 target: /var/lib/dokku/data/storage/docs/docker-images
- name: Deploy the Dokku app based on the Docker image
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_CI_USERNAME }}
password: ${{ secrets.SSH_CI_PASSWORD }}
script_stop: true
script: |
sudo docker load -i /var/lib/dokku/data/storage/docs/docker-images/docs-config-sync-latest.tar
DOCS_CONFIG_SYNC_LATEST_IMAGE=$(sudo docker images --format "{{.ID}}" docs-config-sync:latest)
sudo docker tag docs-config-sync:latest docs-config-sync:$DOCS_CONFIG_SYNC_LATEST_IMAGE
dokku git:from-image docs-config-sync docs-config-sync:$DOCS_CONFIG_SYNC_LATEST_IMAGE
sudo docker system prune --all --force