-
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (59 loc) · 1.92 KB
/
deploy-scheduled.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
64
65
66
67
68
69
name: Scheduled Deploy
on:
schedule:
# https://crontab.guru/#33_1/6_*_*_*
- cron: "33 1/6 * * *"
# CSS Naked Day
- cron: "0 10 8 4 *"
- cron: "0 12 10 4 *"
# JS Naked Day
- cron: "0 10 23 4 *"
- cron: "0 12 25 4 *"
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build:
name: Scheduled 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 }}"