-
-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (53 loc) · 1.73 KB
/
deploy-push.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
59
60
61
62
63
name: Push Deploy
on:
push:
branches:
- main
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build:
name: Push Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Install
uses: ./.github/actions/install
- name: Test
uses: ./.github/actions/test
- name: Build
uses: ./.github/actions/build
env:
NODE_OPTIONS: "--max_old_space_size=8192"
LASTFM_API_TOKEN: ${{ secrets.LASTFM_API_TOKEN }}
MUSICTHREAD_API_KEY: ${{ secrets.MUSICTHREAD_API_KEY }}
PERSONAL_API_KEY: ${{ secrets.PERSONAL_API_KEY }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
TRAKT_CLIENT_ID: ${{ secrets.TRAKT_CLIENT_ID }}
VIGENERE_SECRET: ${{ secrets.VIGENERE_SECRET }}
WEBMENTION_IO_TOKEN: ${{ secrets.WEBMENTION_IO_TOKEN }}
- name: Check Build
uses: ./.github/actions/check
- name: Copy files to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
port: ${{ secrets.DEPLOY_PORT }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
rm: true
source: "_site/*"
target: "${{ secrets.DEPLOY_PATH }}build"
strip_components: 1
- name: Process on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
port: ${{ secrets.DEPLOY_PORT }}
username: ${{ secrets.DEPLOY_USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
script: "${{ secrets.DEPLOY_PATH }}${{ secrets.DEPLOY_FILE }}"