-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #410 from verdigado/task/update-npm-packages-2
Update npm packages and update workflows
- Loading branch information
Showing
19 changed files
with
10,201 additions
and
8,521 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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# .github/workflows/release.yml | ||
|
||
name: Build and Deploy | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: check theme version against tag | ||
run: | | ||
THEME_VERSION=$(cat sass/style.scss | grep Version | sed -r 's/version: +//I') | ||
V="v" | ||
echo Version in style.scss: $THEME_VERSION | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install npm packages | ||
run: npm ci | ||
|
||
- name: Build CSS | ||
run: npm run compile:build | ||
|
||
- name: Build CSS-RTL | ||
run: npm run compile:rtl | ||
|
||
- name: Build JS | ||
run: npm run build | ||
|
||
- name: run install composer | ||
run: composer install | ||
|
||
- name: Make bundle | ||
run: npm run bundle | ||
|
||
build-zip: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Echo debug | ||
run: | | ||
echo "sunflower-${{ github.ref_name }}.zip" | ||
ls -la | ||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Make bundle | ||
run: npm run bundle | ||
|
||
- name: Rename ZIP file | ||
run: | | ||
mv ../sunflower.zip sunflower-${{ github.ref_name }}.zip | ||
- name: Upload Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "sunflower-${{ github.ref_name }}.zip" | ||
allowUpdates: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build-zip | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Provide deploy_key | ||
env: | ||
DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
run: | | ||
mkdir "$HOME/.ssh" | ||
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_rsa" | ||
file "$HOME/.ssh/id_rsa" | ||
chmod 600 "$HOME/.ssh/id_rsa" | ||
- name: save version | ||
run: echo ${GITHUB_REF##*/} > version.txt | ||
|
||
- name: rsync zipfile, version and changelog | ||
run: rsync -z -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt [email protected]:/var/www/updateserver/ |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# .github/workflows/release.yml | ||
|
||
name: Build Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
|
||
env: | ||
NODE_VERSION: 18 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: check theme version against tag | ||
run: | | ||
THEME_VERSION=$(cat sass/style.scss | grep Version | sed -r 's/version: +//I') | ||
V="v" | ||
echo Version in style.scss: $THEME_VERSION | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install npm packages | ||
run: npm ci | ||
|
||
- name: Build CSS | ||
run: npm run compile:build | ||
|
||
- name: Build CSS-RTL | ||
run: npm run compile:rtl | ||
|
||
- name: Build JS | ||
run: npm run build | ||
|
||
- name: run install composer | ||
run: composer install | ||
|
||
- name: Make bundle | ||
run: npm run bundle |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ bundle* | |
vendor/ | ||
style.css | ||
style.css.map | ||
style-rtl.css | ||
announcement.txt | ||
documentation/ | ||
build/ | ||
|
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,18 +1,18 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-wordpress/scss" | ||
"@wordpress/stylelint-config/scss" | ||
], | ||
"ignoreFiles": [ | ||
"sass/_normalize.scss" | ||
], | ||
"rules": { | ||
"indentation": 4, | ||
"font-family-no-missing-generic-family-keyword": null, | ||
"no-descending-specificity": null, | ||
"block-no-empty": null, | ||
"no-duplicate-selectors": null, | ||
"font-family-no-duplicate-names": null, | ||
"selector-class-pattern": null, | ||
"function-url-quotes": null | ||
|
||
} | ||
} |
Oops, something went wrong.