forked from codegouvfr/eleventy-dsfr
-
Notifications
You must be signed in to change notification settings - Fork 14
34 lines (32 loc) · 965 Bytes
/
production.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
name: Deploy code.gouv.fr website to production
on:
push:
branches: ["production"]
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Build with Eleventy
run: |
npm install
npm run build-production
- name: Index site for pagefind
run: npm run postbuild
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # must be in PEM format
ARGS: "-av --delete"
SOURCE: _site/
REMOTE_HOST: ${{ secrets.REMOTE_HOST_PROD }}
REMOTE_USER: ${{ secrets.REMOTE_USER_PROD }}
TARGET: ${{ secrets.REMOTE_TARGET_PROD }}