-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (68 loc) · 2.54 KB
/
deploy.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
name: Deploy to GH Pages
on:
workflow_dispatch: ~
push:
branches:
- main
jobs:
deploy:
name: '🚧 Build & deploy 🚀'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: "memory_limit=-1"
php-version: "8.3"
tools: symfony
- name: 'Determine composer cache directory'
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: 'Cache composer dependencies'
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: composer-${{ hashFiles('composer.lock') }}
- name: 'Cache resized images'
uses: actions/cache@v2
with:
path: public/resized
key: resized-images-${{ secrets.CACHE_VERSION }}
- name: 'Install dependencies'
run: |
echo "::group::composer install"
composer install --no-progress --ansi
echo "::endgroup::"
echo "::group::importmap install"
symfony console importmap:install --ansi
echo "::endgroup::"
- name: 'Warmup'
run: |
echo "::group::warmup production env"
bin/console cache:clear --ansi
bin/console cache:warmup --ansi
bin/console sass:build --ansi
bin/console asset-map:compile --ansi
echo "::endgroup::"
env:
APP_ENV: prod
- name: 'Build static site'
run: bin/console stenope:build --no-interaction -vvv --ansi
env:
APP_ENV: prod
# Replace with your GH Pages URL:
ROUTER_DEFAULT_URI: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
# https://github.com/marketplace/actions/deploy-to-github-pages
- name: '🚀 Deploy'
uses: JamesIves/[email protected]
with:
COMMIT_MESSAGE: "[AUTO] Static site update for ${{ github.sha }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
CLEAN_EXCLUDE: '["CNAME", ".nojekyll"]' # Don't clean CNAME file for custom domain nor .nojekyll file to disable Jekyll on Github Pages