-
-
Notifications
You must be signed in to change notification settings - Fork 34
60 lines (52 loc) · 1.85 KB
/
netlify.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
52
53
54
55
56
57
58
59
60
name: Build and Deploy to Netlify
on:
pull_request_target:
jobs:
build:
runs-on: "ubuntu-22.04"
if: github.repository_owner == 'ThePHPF'
steps:
- uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Update Image Version in the related HelmChart values.yaml
uses: fjogeleit/yaml-update-action@main
with:
valueFile: 'app/config/sculpin_site_prod.yml'
propertyPath: 'url'
value: https://deploy-pr-${{ github.event.number }}--thephpfoundation.netlify.app
commitChange: false
updateFile: true
- name: Install asset deps
run: npm install
- name: Build production assets
run: npx tailwind -i assets/css/app.css -o source/assets/css/app.css --minify
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, intl, readline
tools: composer:v2
- name: Install PHP deps
uses: ramsey/composer-install@v2
- name: Build production site
run: ./vendor/bin/sculpin generate --env=prod
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
production-deploy: false
publish-dir: './output_prod'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: true
overwrites-pull-request-comment: true
enable-commit-comment: false
alias: deploy-pr-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1