Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create zip-prs #95

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/zip-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and push to build branch

on:
pull_request:
types:
- opened
- synchronize

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Trim the repo down to just the theme
run: |
rm -rf source/wp-content/themes/wporg-parent-2021/node_modules
mv source/wp-content/themes/wporg-parent-2021 $RUNNER_TEMP
git rm -rfq .
rm -rf *
mv $RUNNER_TEMP/wporg-parent-2021/* .

- name: Zip theme folder
uses: montudor/action-zip@v1
with:
args: zip -qq -r theme.zip .

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: theme-archive
path: theme.zip
Loading