Skip to content

Add install checker module #29

Add install checker module

Add install checker module #29

name: Satis Build On Push
on:
push:
paths:
- satis.json
branches:
- main
concurrency:
group: ${{ github.repository }}-build
cancel-in-progress: false
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.TOKEN }}"}}'
jobs:
satisBuild:
name: Satis Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
tools: composer, cs2pr
- name: PHP version
run: php --version
- name: Validate Composer files
run: composer validate
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer vendor directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install PHP dependencies
run: composer install
- name: Checkout GitHub pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: ./dist
- name: Run Build
run: composer run build
- name: List files
run: ls -lah ./dist
- name: Commit web files
run: |
cd ./dist
git config --local user.name "Newfold WordPress Team"
git config --local user.email "[email protected]"
git remote -v
git add -A
git commit -m "Satis build triggered by commit ${{ github.sha }}"
git status
cd -
- name: Push changes
uses: ad-m/[email protected]
with:
branch: gh-pages
directory: ./dist
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Send message to ms teams
uses: dhollerbach/[email protected]
with:
webhook: '${{ secrets.INCOMING_WEBHOOK_URL }}'
message: 'Satis updates deployed! Visit https://newfold-labs.github.io/satis/'