Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Aug 31, 2024
0 parents commit f2169e8
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
59 changes: 59 additions & 0 deletions .github/workflows/satis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Satis Build

on:
workflow_dispatch:
push:
branches:
- master
env:
BUILD_DIR: build

jobs:
builder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Start SSH agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.PACKAGIST_DEPLOY_PRIVATE_KEY }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer
restore-keys: ${{ runner.os }}-composer

- name: Build
uses: docker://composer/satis:latest
with:
volume: "${{ steps.composer-cache.outputs.dir }}:/composer"
args: composer/satis build satis.json --no-interaction ${{ env.BUILD_DIR }}
env:
SSH_AUTH_SOCK: ${{ env.SSH_AUTH_SOCK }}

- name: Publish to GitHub pages
run: |
git checkout gh-pages
rm -rf include/*
cp -R ${{ env.BUILD_DIR }}/* .
rm -rf ${{ env.BUILD_DIR }}/
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -m "Updated repository"
git push
8 changes: 8 additions & 0 deletions satis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "genero/packagist",
"homepage": "https://generoi.github.io/packagist",
"repositories": [
{ "type": "vcs", "url": "https://github.com/generoi/role-based-pricing-for-woocommerce.git" }
],
"require-all": true
}

0 comments on commit f2169e8

Please sign in to comment.