forked from WordPress/wordpress-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.85 KB
/
Copy pathrefresh-wordpress-nightly.yml
File metadata and controls
51 lines (48 loc) · 1.85 KB
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
name: 'Refresh WordPress Nightly'
on:
workflow_dispatch:
# Deploy the nightly version of WordPress every day at 8am UTC
schedule:
- cron: '0 8 * * *'
jobs:
build_and_deploy:
# Only run this workflow from the trunk branch and when it's triggered by a Playground maintainer
if: >
github.ref == 'refs/heads/trunk' && (
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
github.actor == 'bgrgicak' ||
github.actor == 'brandonpayton' ||
github.actor == 'zaerl' ||
github.actor == 'janjakes' ||
github.actor == 'mho22' ||
github.actor == 'ashfame'
)
runs-on: ubuntu-latest
environment:
name: wordpress-assets
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
clean: true
persist-credentials: true
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: true
- uses: ./.github/actions/prepare-playground
with:
node-version: 22
- name: 'Recompile WordPress'
shell: bash
run: npx nx bundle-wordpress:nightly playground-wordpress-builds
- name: Config git user
run: |
git config --global user.name "deployment_bot"
git config --global user.email "deployment_bot@users.noreply.github.com"
git add -A
git commit -a -m "Refresh WordPress Nightly"
git pull --rebase
# Push if the pull did not result in a conflict
if [ $? -eq 0 ]; then
git push
fi;