-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.52 KB
/
deploy-main.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy from stable to the site
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
name: Deploy to huronos.org
runs-on: ubuntu-latest
steps:
- name: 📡 Get latest code
uses: actions/checkout@v3
- name: 🍔 Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: 🦕 Install Docusaurus
run: yarn install --frozen-lockfile
- name: 🧹 Delete TODO Files
run: |
chmod +x ./.github/scripts/quit-todo.sh
./.github/scripts/quit-todo.sh
- name: 🍳 Prepare website configs for production
run: |
chmod +x ./.github/scripts/set-prod-config.sh
./.github/scripts/set-prod-config.sh
# - name: Update version
# run: yarn docusaurus docs:version ${{ github.event.head_commit.message }}
#- uses: stefanzweifel/git-auto-commit-action@v4
- name: 🛠️ Build website
run: yarn build
- name: 🪁 Deploy
uses: wlixcc/[email protected]
with:
server: ${{ secrets.PROD_HOST }}
username: ${{ secrets.PROD_SSH_USERNAME }}
password: ${{ secrets.PROD_SSH_PASSWORD }}
local_path: './build/*'
remote_path: ${{ secrets.PROD_DEPLOY_PATH }}
delete_remote_files: true
sftp_only: false
# Deploy to the site through ssh or alike
# https://github.com/easingthemes/ssh-deploy