-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·60 lines (50 loc) · 1.44 KB
/
deploy.yml
File metadata and controls
executable file
·60 lines (50 loc) · 1.44 KB
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
59
60
name: Deploy to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm install
- name: Build website
run: npm run build
- name: Check build output
run: |
echo "PWD=$(pwd)"
ls -lah
ls -lah build
find build -maxdepth 2 -type f | head -n 20
- name: Copy build to server via SSH
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
source: "build/**"
target: /www/wwwroot/dshanpi.100ask.net/
strip_components: 1
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CI_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
cname: dshanpi.100ask.org