Skip to content

Commit

Permalink
ci: Add draft publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gregswift committed Aug 4, 2024
1 parent 2d08ada commit dbaa3df
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish-draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Draft

on:
workflow_dispatch:
workflow_run:
workflows:
- "Run validation and build checks"
branches:
- '!main'
types:
- completed

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

environment: draft

env:
CONTAINER_ENGINE: docker

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Deployment key
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.DEPLOY_KEY }}" | base64 -d > ~/.ssh/id_rsa
- name: Publish site
run: make publish
env:
TARGET_SYSTEM: ${{ vars.TARGET_SYSTEM }} # This should be user@host
TARGET_PORT: ${{ vars.TARGET_PORT }}
TARGET_DIR: ${{ vars.TARGET_DIR }}/${{ github.ref_name }}
PUBLISH_DRAFT: true

0 comments on commit dbaa3df

Please sign in to comment.