Skip to content

Commit 0a556f1

Browse files
committed
v1.0.1: Initial Release Version
1 parent 0693872 commit 0a556f1

File tree

4 files changed

+102
-3
lines changed

4 files changed

+102
-3
lines changed

.github/workflows/deploy.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: deploy
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build_deploy:
14+
name: Build and Deploy
15+
runs-on: ubuntu-latest
16+
env:
17+
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup SSH key and known_hosts
23+
run: |
24+
mkdir -p -m 700 ~/.ssh
25+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
26+
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
27+
ssh-keyscan ${{ secrets.DEPLOY_TARGET }} >> ~/.ssh/known_hosts
28+
ssh-keyscan ${{ secrets.DEPLOY_KIT_TARGET }} >> ~/.ssh/known_hosts
29+
30+
- name: Use Node.js 20
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
35+
# Set up composer caching
36+
- name: Cache Composer dependencies
37+
uses: actions/cache@v4
38+
with:
39+
path: /tmp/composer-cache
40+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
41+
42+
# Build Parts Kit Plugin
43+
- name: Build Parts Kit plugin
44+
run: |
45+
npm ci
46+
npm run build
47+
working-directory: wp-content/plugins/viget-parts-kit
48+
49+
# Deploy code
50+
- name: Deploy Sandbox
51+
run: |
52+
53+
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_TARGET }} "\
54+
sudo chown -R ${{ secrets.DEPLOY_USER }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content &&\
55+
sudo rm -rf ${{ secrets.APP_PATH }}/wp-content/plugins/viget-parts-kit &&\
56+
rsync -rlptzv --exclude="node_modules" ./wp-content/ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_TARGET }}:${{ secrets.APP_PATH }}/wp-content/
57+
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_TARGET }} "\
58+
sudo chown -R ${{ secrets.DEPLOY_USER }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content &&\
59+
sudo chown -R ${{ secrets.DEPLOY_DAEMON }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content/plugins"
60+
61+
- name: Deploy Parts Kit
62+
run: |
63+
64+
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_KIT_TARGET }} "\
65+
sudo chown -R ${{ secrets.DEPLOY_USER }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content &&\
66+
sudo rm -rf ${{ secrets.APP_PATH }}/wp-content/plugins/viget-parts-kit &&\
67+
rsync -rlptzv --exclude="node_modules" ./wp-content/ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_KIT_TARGET }}:${{ secrets.APP_PATH }}/wp-content/
68+
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_KIT_TARGET }} "\
69+
sudo chown -R ${{ secrets.DEPLOY_USER }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content &&\
70+
sudo chown -R ${{ secrets.DEPLOY_DAEMON }}:${{ secrets.DEPLOY_DAEMON }} ${{ secrets.APP_PATH }}/wp-content/plugins"

.github/workflows/release.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Create release for any tag starting with 'v'
7+
8+
concurrency:
9+
group: release
10+
cancel-in-progress: true
11+
12+
jobs:
13+
release:
14+
name: Create GitHub Release
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Create GitHub Release
22+
run: |
23+
gh release create "$TAG" --verify-tag \
24+
--title "$TAG: $(date '+%Y-%m-%d')" \
25+
--generate-notes \
26+
--latest
27+
env:
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
TAG: ${{ github.ref_name }}

packages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"package": {
33
"name": "viget/viget-parts-kit",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"source": {
66
"url": "/root/path/not/relative/path/to/viget-parts-kit/.git",
77
"type": "git",

viget-parts-kit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Viget Parts Kit
44
* Plugin URI: https://viget.com
55
* Description: Component Parts Kit integration for WordPress made by Viget.
6-
* Version: 1.0.0
6+
* Version: 1.0.1
77
* Requires at least: 5.7
88
* Requires PHP: 8.1
99
* Author: Viget
@@ -17,7 +17,7 @@
1717
*/
1818

1919
// Plugin version.
20-
const VPK_VERSION = '1.0.0';
20+
const VPK_VERSION = '1.0.1';
2121

2222
// Plugin file.
2323
const VPK_PLUGIN_FILE = __FILE__;

0 commit comments

Comments
 (0)