-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
1 changed file
with
22 additions
and
22 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,32 +1,32 @@ | ||
name: Zip Files on Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- test-wordpress-playground | ||
push: | ||
branches: | ||
- test-wordpress-playground | ||
|
||
jobs: | ||
zip-files: | ||
runs-on: ubuntu-latest | ||
zip-files: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create ZIP file | ||
run: | | ||
# Define the files or directories you want to zip | ||
DIRECTORY_TO_ZIP="web/app/themes/future-natures" | ||
- name: Create ZIP file | ||
run: | | ||
# Define the files or directories you want to zip | ||
DIRECTORY_TO_ZIP="web/app/themes/future-natures" | ||
# Create a unique timestamp for the zip file | ||
TIMESTAMP=$(date +'%Y%m%d%H%M%S') | ||
# Create a unique timestamp for the zip file | ||
TIMESTAMP=$(date +'%Y%m%d%H%M%S') | ||
# Create the zip file | ||
cd $DIRECTORY_TO_ZIP | ||
zip -r "../archive_$TIMESTAMP.zip" . | ||
# Create the zip file | ||
cd $DIRECTORY_TO_ZIP | ||
zip -r "../archive_$TIMESTAMP.zip" . | ||
- name: Upload ZIP file as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: zipped-files | ||
path: archive_*.zip | ||
- name: Upload ZIP file as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: zipped-files | ||
path: archive_*.zip |