tracking-filter/.github/workflows/pages.yml

36 lines
945 B
YAML
Raw Normal View History

2022-01-09 02:56:14 +00:00
name: Pages
on:
schedule:
2022-01-09 08:54:36 +00:00
- cron: "0 0,12 * * *"
2022-01-09 02:56:14 +00:00
workflow_dispatch:
jobs:
pages:
runs-on: ubuntu-latest
2022-01-09 08:54:36 +00:00
container: node:lts-alpine
2022-01-09 02:56:14 +00:00
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
2022-01-09 08:54:36 +00:00
run: |
apk update
apk add brotli curl git grep
2022-01-09 02:56:14 +00:00
- name: Build
2022-01-09 08:54:36 +00:00
run: sh src/script.sh
- name: Compress
run: |
find public -type f -regex '.*\.\(txt\|conf\|tpl\|rules\)$' -exec gzip -f -k -9 {} \;
find public -type f -regex '.*\.\(txt\|conf\|tpl\|rules\)$' -exec brotli -f -k -9 {} \;
2022-01-09 02:56:14 +00:00
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
2022-01-09 08:54:36 +00:00
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ./tmp/
retention-days: 30