@@ -31,27 +31,17 @@ jobs:
31
31
npm ci --ignore-scripts
32
32
env :
33
33
NODE_AUTH_TOKEN : ${{ secrets.FONTAWESOME_AUTH_TOKEN }}
34
- - name : Build production
35
- run : hugo --minify --destination public/prod
36
- - name : Build staging
37
- run : hugo --baseURL=https://staging.cryptomator.org/ --environment=staging --minify --destination public/staging
38
- - name : Add robots.txt for staging
39
- run : ' echo -e "User-agent: *\nDisallow: /" > public/staging/robots.txt'
40
- - name : Upload Prod Pages artifact
34
+ - name : Build
35
+ run : hugo --minify
36
+ - name : Upload artifact
41
37
uses : actions/upload-pages-artifact@v3
42
38
with :
43
- name : prod-site
44
- path : ./public/prod
45
- - name : Upload Staging artifacts
46
- uses : actions/upload-artifact@v4
47
- with :
48
- name : staging-site
49
- path : ./public/staging
39
+ path : ' public'
50
40
51
- # DEPLOY PROD
52
- deploy-prod :
41
+ # DEPLOY
42
+ deploy :
53
43
if : github.ref == 'refs/heads/main'
54
- name : Deploy Prod to GitHub Pages
44
+ name : Deploy to GitHub Pages
55
45
runs-on : ubuntu-latest
56
46
needs : [build]
57
47
permissions : # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
61
51
- name : Deploy to GitHub Pages
62
52
id : deployment
63
53
uses : actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
64
- with :
65
- artifact_name : prod-site
66
54
environment : # Deploy to the github-pages environment
67
55
name : github-pages
68
56
url : ${{ steps.deployment.outputs.page_url }}
69
-
70
- # DEPLOY STAGING
71
- deploy-staging :
72
- if : github.ref == 'refs/heads/develop'
73
- name : Deploy Staging to GitHub Pages
74
- runs-on : ubuntu-latest
75
- needs : [build]
76
- steps :
77
- - name : Download build
78
- uses : actions/download-artifact@v4
79
- with :
80
- name : staging-site
81
- path : ./public
82
- - name : Deploy to Staging Repository
83
- uses : peaceiris/actions-gh-pages@v3
84
- with :
85
- personal_token : ${{ secrets.CRYPTOBOT_DEPLOY_STAGING_WEBSITE }}
86
- external_repository : cryptomator/staging.cryptomator.github.io
87
- publish_dir : ./public
88
- publish_branch : main
89
- cname : staging.cryptomator.org
90
-
0 commit comments