Skip to content

Commit e2d9ce6

Browse files
authored
Update deploy.yml
1 parent 2cad7d2 commit e2d9ce6

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy SLS
1+
name: Deploy SLS DOCs
22

33
on:
44
push:
@@ -9,7 +9,6 @@ on:
99
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1010
permissions:
1111
contents: read
12-
pages: write
1312
id-token: write
1413

1514
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
@@ -38,21 +37,30 @@ jobs:
3837
- name: Build with VitePress
3938
run: |
4039
npm run docs:build
41-
touch .vitepress/dist/.nojekyll
4240
- name: Upload artifact
43-
uses: actions/upload-pages-artifact@v2
41+
uses: actions/upload-artifact@master
4442
with:
43+
name: dists
4544
path: .vitepress/dist
46-
4745
# Deployment job
48-
# deploy:
49-
# environment:
50-
# name: github-pages
51-
# url: ${{ steps.deployment.outputs.page_url }}
52-
# needs: build
53-
# runs-on: ubuntu-latest
54-
# name: Deploy
55-
# steps:
56-
# - name: Deploy to GitHub Pages
57-
# id: deployment
58-
# uses: actions/deploy-pages@v2
46+
deploy:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
name: Deploy
50+
steps:
51+
- name: Deploy checkout
52+
uses: actions/checkout@master
53+
- name: Download artifact
54+
uses: actions/download-artifact@master
55+
with:
56+
name: dists
57+
path: .vitepress/dist
58+
- name: Install SSH Key
59+
uses: shimataro/ssh-key-action@v2
60+
with:
61+
key: ${{ secrets.SSH_PRIVATE_KEY }}
62+
known_hosts: 'placeholder'
63+
- name: Adding Known Hosts
64+
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
65+
- name: Deploy with rsync
66+
run: rsync -avz .vitepress/dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/html/cms2/docs/

0 commit comments

Comments
 (0)