File tree Expand file tree Collapse file tree 1 file changed +37
-4
lines changed Expand file tree Collapse file tree 1 file changed +37
-4
lines changed Original file line number Diff line number Diff line change 35
35
node-version-file : ' .nvmrc'
36
36
cache : ' npm'
37
37
38
+ - name : Setup Python
39
+ uses : actions/setup-python@v5
40
+ with :
41
+ python-version : ' 3.12'
42
+
43
+ - name : Google Cloud Login
44
+ uses : google-github-actions/auth@v2
45
+ with :
46
+ credentials_json : ' ${{ secrets.RUN_SA_KEY_DEV }}'
47
+
48
+ - name : Setup Google Cloud SDK
49
+ uses : google-github-actions/setup-gcloud@v2
50
+ with :
51
+ project_id : ${{ secrets.RUN_PROJECT_DEV }}
52
+ env :
53
+ CLOUDSDK_PYTHON : ${{ env.pythonLocation }}/python
54
+
38
55
- name : Set Preview Path
39
- run : echo "PREVIEW_PATH=sauce-docs/ pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
56
+ run : echo "PREVIEW_PATH=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"
40
57
41
58
- name : Install Dependencies
42
59
if : github.event.action != 'closed' # Skip if the PR was closed
48
65
run : |
49
66
npm run build
50
67
51
- - name : Deploy PR
52
- uses : rossjrw/pr-preview-action@v1
68
+ - name : Deploy
69
+ if : github.event.action != 'closed' # Skip if the PR was closed
70
+ working-directory : build
71
+ run : |-
72
+ gsutil -m rsync -R -d . ${{ secrets.GCS_DEV_BUCKET }}/${{ env.PREVIEW_PATH }}
73
+
74
+ - name : Deploy Message
75
+ if : github.event.action != 'closed' # Skip if the PR was closed
76
+ uses : unsplash/comment-on-pr@master
77
+ env :
78
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53
79
with :
54
- source-dir : ./build/
80
+ msg : |
81
+ Deploy preview ready for ${{ github.event.number }}!
82
+ https://docs.dev.saucelabs.net/${{ env.PREVIEW_PATH }}
83
+
84
+ - name : Cleanup
85
+ if : github.event.action == 'closed' # Cleanup action only on PR closure
86
+ run : |-
87
+ gsutil rm -r ${{ secrets.GCS_DEV_BUCKET }}/${{ env.PREVIEW_PATH }}
You can’t perform that action at this time.
0 commit comments