gh-pages #1399
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
name: gh-pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' # Midnight - every night | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
name: Deploy to gh-pages | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@2.30.4 | |
with: | |
php-version: 7.4 | |
tools: composer:v2 | |
- name: Install dependencies | |
run: | | |
composer -g config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} | |
composer install --prefer-dist --no-interaction --no-progress | |
- name: Build satis | |
run: | | |
./vendor/bin/satis build ./satis.json ./public | |
shopt -s globstar | |
sed -i -e 's/\(pear-pear\.horde\.org\/.*\)/\L\1/' public/**/*.json | |
sed -i -e 's/"type": "file",/"type": "tar",/' public/**/*.json | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4.6.0 | |
with: | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: public # The folder the action should deploy. | |
CLEAN: true # Automatically remove deleted files from the deploy branch |