Skip to content

Build

Build #332

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '30 3 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run script
run: |
php new-releases.php
env:
MASTODON_URL: ${{ secrets.MASTODON_URL }}
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
- name: "Commit new file(s) to this repository"
run: |
git config user.name github-actions
git config user.email [email protected]
git add cache/releases.json
git add site/index.json
git commit -m "Auto-update for new version" || true
git push || true
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: aaf8eef9dd565a13de210d18c7462092
projectName: version
directory: site
wranglerVersion: '3'