-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.66 KB
/
satis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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: Create composer.json
run: echo "{}" > composer.json
- 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