-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.33 KB
/
deploy-prod.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
name: Deploy to live
on:
workflow_dispatch:
schedule:
- cron: "20 04 */1 * *"
concurrency:
group: deploy-prod
cancel-in-progress: true
jobs:
build:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache-dependency-path: ${{ env.BUILD_PATH }}/package-lock.json
- name: Install dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Build Eleventy in production mode
run: npm run build-production
- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: bristolfurs-prod
path: _site
retention-days: 1
deploy:
name: Deploy to production
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: bristolfurs-prod
- name: Upload files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: ${{ secrets.FTP_PRODUCTION_PATH }}
protocol: ftps
port: 21