Skip to content

Commit

Permalink
Fix merge conflicts and lint scss files
Browse files Browse the repository at this point in the history
  • Loading branch information
albig committed Nov 2, 2023
2 parents 34019c1 + f86ca1d commit 8a3abfc
Show file tree
Hide file tree
Showing 83 changed files with 9,720 additions and 7,016 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
104 changes: 104 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# .github/workflows/release.yml

name: Build and Deploy

on:
release:
types: [published]

env:
NODE_VERSION: 18

jobs:
build-deploy:
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

- name: fail on fork
if: github.repository_owner != 'verdigado'
run: exit 1

- 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 }}

- 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 -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" ../sunflower-${{ github.ref_name }}.zip version.txt [email protected]:/var/www/updateserver/

mkdocs:
runs-on: ubuntu-latest
needs: build-deploy
steps:
- uses: actions/checkout@v4

- name: mkdocs build
uses: Tiryoh/actions-mkdocs@v0
with:
mkdocs_version: 'latest' # option
# mkdocs_version: '1.1' # option
# requirements: 'requirements.txt' # option
configfile: 'mkdocs/mkdocs.yml' # option

- 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 documentation
run: rsync -a -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa" --delete documentation [email protected]:/var/www/documentation/
56 changes: 56 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# .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: Lint SCSS
run: npm run lint:scss

- name: Build CSS
run: npm run compile:css

- name: Build CSS-RTL
run: npm run compile:rtl

- name: Lint JS
run: npm run lint:js

- name: Build JS
run: npm run build

- name: run install composer
run: composer install

- name: Make bundle
run: npm run bundle
51 changes: 0 additions & 51 deletions .github/workflows/ci.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ bundle*
vendor/
style.css
style.css.map
style-rtl.css
announcement.txt
documentation/
build/
assets/vndr/
.favorites.json
.vscode/settings.json
.vscode
pa11y.json
8 changes: 5 additions & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"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

"function-url-quotes": null,
"declaration-property-unit-allowed-list": null,
"scss/no-global-function-names": null
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}
],
"require": {
"php": ">=5.6",
"php": ">=7.4",
"johngrogg/ics-parser": "^2.2"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"wptrt/wpthemereview": "^0.2.1",
"php-parallel-lint/php-parallel-lint": "^1.2.0",
"wp-cli/i18n-command": "^2.2.5",
"wp-cli/i18n-command": "^2.4.4",
"wp-coding-standards/wpcs": "^2.3",
"squizlabs/php_codesniffer": "^3.6"
},
Expand Down
Loading

0 comments on commit 8a3abfc

Please sign in to comment.