Skip to content

Commit

Permalink
wip: prototype deploy to casparcg.com
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 19, 2023
1 parent 9ccb6c8 commit b764ca1
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
npm run build
env:
CI: true
- name: Upload artifact
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: "./build"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: docusaurus
path: "./build"

# Deployment job
deploy:
Expand All @@ -58,3 +63,31 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

# Deployment job
deploy-ssh:
name: Deploy to
environment:
name: casparcg.com
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: docusaurus
- name: Upload
shell: bash
run: |
if [ -z "$SSH_KEY" ] || [ -z "$SSH_HOST" ] || [ -z "$SSH_USERNAME" ] || [ -z "$DEPLOY_PATH" ]; then
echo "Missing deploy credentials"
else
echo "$SSH_KEY" >> ~/.ssh/id_rsa
rsync -avvz build/ $SSH_USERNAME@$SSH_HOST:$DEPLOY_PATH
env:
SSH_KEY : ${{secrets.DEPLOY_SSH_KEY}}
SSH_HOST : ${{secrets.DEPLOY_SSH_HOST}}
SSH_USERNAME : ${{secrets.DEPLOY_SSH_USERNAME}}
DEPLOY_PATH : ${{secrets.DEPLOY_PATH}}

0 comments on commit b764ca1

Please sign in to comment.