forked from WordPress/wordpress-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78b67d9
commit 8eacac0
Showing
1 changed file
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
#name: 'Refresh WordPress assets' | ||
# | ||
#on: | ||
# workflow_dispatch: | ||
# # Every day at 8am UTC | ||
name: 'Refresh WordPress assets' | ||
|
||
on: | ||
workflow_dispatch: | ||
# 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 dmsnell OR adamziel | ||
|
||
jobs: | ||
build_and_deploy: | ||
# Only run this workflow from the trunk branch and when it's triggered by dmsnell OR adamziel | ||
# if: > | ||
# github.ref == 'refs/heads/trunk' && ( | ||
# github.actor == 'adamziel' || | ||
# github.actor == 'dmsnell' | ||
# ) | ||
# | ||
# runs-on: ubuntu-latest | ||
# environment: | ||
# name: wordpress-assets | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# ref: ${{ github.event.pull_request.head.ref }} | ||
# clean: true | ||
# fetch-depth: 0 | ||
# persist-credentials: false | ||
# - uses: ./.github/actions/prepare-playground | ||
# - name: 'Recompile WordPress' | ||
# shell: bash | ||
# run: npx nx recompile-wordpress:all playground-remote | ||
# - name: Config git user | ||
# run: | | ||
# git config --global user.name "deployment_bot" | ||
# git config --global user.email "deployment_bot@users.noreply.github.com" | ||
# git remote set-url origin https://${{ secrets.GH_ACTOR }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} | ||
# git add -A | ||
# git commit -a -m "Recompile WordPress" | ||
# git pull --rebase | ||
# # Push if the pull did not result in a conflict | ||
# if [ $? -eq 0 ]; then | ||
# git push origin HEAD:trunk | ||
# fi; | ||
|
||
runs-on: ubuntu-latest | ||
environment: | ||
name: wordpress-assets | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
clean: true | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: ./.github/actions/prepare-playground | ||
- name: 'Recompile WordPress' | ||
shell: bash | ||
run: npx nx recompile-wordpress:all playground-remote | ||
- name: Config git user | ||
run: | | ||
git config --global user.name "deployment_bot" | ||
git config --global user.email "deployment_bot@users.noreply.github.com" | ||
git remote set-url origin https://${{ secrets.GH_ACTOR }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} | ||
git add -A | ||
git commit -a -m "Recompile WordPress" | ||
git pull --rebase | ||
# Push if the pull did not result in a conflict | ||
if [ $? -eq 0 ]; then | ||
git push origin HEAD:${{ github.ref }} | ||
fi; |