-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
69 lines (56 loc) · 1.29 KB
/
.travis.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
61
62
63
64
65
66
67
68
69
# Delete this file if using GitHub actions for CI.
dist: focal
services:
- docker
language: php
php: '8.2'
before_install:
- nvm install
- nvm use
- mkdir -p uploads
install:
- echo "$DOCKER_PASSWORD" | docker login ghcr.io -u "$DOCKER_USERNAME" --password-stdin || true
- docker compose pull wordpress mkcert || true
- npm install
script:
- npm run lint
- npm run test
deploy:
# Build and deploy Docker images
- provider: script
script:
- sudo apt update
- sudo apt install -y docker-buildx
- docker buildx create --use
- docker buildx bake --push --progress=plain --set='*.platform=linux/amd64,linux/arm64'
skip_cleanup: true
on:
branch: master
condition: -n "$DOCKER_USERNAME" && -z $SKIP_DEPLOY
# Deploy to production.
- provider: script
script:
- npm run deploy-production
skip_cleanup: true
on:
branch: master
condition: -z $SKIP_DEPLOY
# Deploy to staging.
- provider: script
script:
- npm run deploy-staging
skip_cleanup: true
on:
branch: develop
condition: -z $SKIP_DEPLOY
# Travis must run on brances that need to be deployed.
branches:
only:
- master
- develop
cache:
npm: true
directories:
- $HOME/.composer/cache
notifications:
email: false