-
Notifications
You must be signed in to change notification settings - Fork 50
38 lines (34 loc) · 1.39 KB
/
deployPreview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy to Preview Site
on:
# Add any branches that you want to auto-deploy on push here.
# WARNING: If a branch is auto-deploying, it will overright any manual deployments.
# Use with caution and warn anyone else that this branch is basically taking over the preview site!
#push:
#branches: []
workflow_dispatch:
permissions:
contents: read
#id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "preview"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone to preview folder (excluding actions)
run: rsync -arv --delete --delete-excluded --exclude=".github" --exclude="preview-output" --exclude="preview-output" --exclude=".git" ./ preview-output/
- name: Push to staging repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: 'preview-output'
destination-github-username: 'UnifiedID2'
destination-repository-name: 'uid2-docs-preview'
target-branch: main
target-directory: preview