File tree 2 files changed +51
-1
lines changed
2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy code.gouv.fr website to preproduction
2
+
3
+ on :
4
+ # Runs on pushes targeting the default branch
5
+ push :
6
+ branches : ["main"]
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+
11
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
12
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
13
+ concurrency :
14
+ group : " pages"
15
+ cancel-in-progress : false
16
+
17
+ jobs :
18
+ # Build job
19
+ build :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v3
24
+ - name : Build with Eleventy
25
+ run : |
26
+ npm install
27
+ npm run build-preproduction
28
+ - uses : actions/upload-artifact@v3
29
+ with :
30
+ name : site
31
+ path : _site/
32
+
33
+ # Deployment job
34
+ deploy :
35
+ runs-on : ubuntu-latest
36
+ needs : build
37
+ steps :
38
+ - uses : actions/download-artifact@v3
39
+ with :
40
+ name : site
41
+ path : _site/
42
+ - name : Deploy to Server
43
+ uses : easingthemes/ssh-deploy@main
44
+ env :
45
+ SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
46
+ ARGS : " -av --delete"
47
+ SOURCE : _site/
48
+ REMOTE_HOST : ${{ secrets.REMOTE_HOST }}
49
+ REMOTE_USER : ${{ secrets.REMOTE_USER }}
50
+ TARGET : ${{ secrets.REMOTE_TARGET }}
Original file line number Diff line number Diff line change 4
4
"description" : " Une base de code pour déployer un site/blog statique avec Eleventy et le DSFR." ,
5
5
"scripts" : {
6
6
"build" : " npx @11ty/eleventy" ,
7
- "build-ghpages " : " npx @11ty/eleventy --pathprefix=/eleventy-dsfr/ " ,
7
+ "build-preproduction " : " npx @11ty/eleventy" ,
8
8
"start" : " npx @11ty/eleventy --serve --quiet" ,
9
9
"debug" : " DEBUG=Eleventy* npx @11ty/eleventy" ,
10
10
"debugstart" : " DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet" ,
You can’t perform that action at this time.
0 commit comments