Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless rework #89

Merged
merged 5 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,25 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
phpstan:
runs-on: ubuntu-latest
container:
image: jakzal/phpqa:php8.1
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: '8.3'
- name: Install dependencies
run: composer install
- name: PHPStan
run: phpstan analyse
run: ./vendor/bin/phpstan analyse
php-cs-fixer:
runs-on: ubuntu-latest
container:
image: jakzal/phpqa:php8.1
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: '8.3'
- name: Install dependencies
run: composer install
- name: PHP-CS-Fixer
run: php-cs-fixer fix
run: ./vendor/bin/php-cs-fixer fix
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
/.php_cs.cache
/.php-cs-fixer.cache
/coverage.xml
/.serverless/
/node_modules/
2 changes: 2 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
node = '20.11.1'
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,30 @@ Configure this to run on a regular schedule using something that your OS provide

_Note: Don't set the schedule frequency to high to not overload their website_

# Licence
## Run (serverless)

Termin can also be run as a serverless application. Configure the application like you would normally.

Then configure your environment with [serverless tooling][9].

```bash
npm install
```

And finally deploy:

```bash
./node_modules/.bin/serverless deploy
```

To remove run:

```bash
./node_modules/.bin/serverless remove
```


# License

MIT

Expand All @@ -210,3 +233,4 @@ MIT
[6]: https://ntfy.sh/
[7]: https://ntfy.sh/docs/subscribe/phone/
[8]: https://ntfy.sh/docs/subscribe/web/
[9]: https://bref.sh/docs/setup
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"php": ">=8.1",
"ext-curl": "*",
"ext-dom": "*",
"bref/bref": "^2.1",
"campo/random-user-agent": "^1.3",
"ivkos/pushbullet": "^3.3",
"monolog/monolog": "^2.1.1",
Expand All @@ -25,6 +26,8 @@
}
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.49",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.4"
},
"autoload-dev": {
Expand All @@ -33,6 +36,9 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"platform": {
"php": "8.1.27"
}
}
}
Loading