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

42 lines
1.1 KiB
YAML

name: Pages
on:
schedule:
- cron: "0 0 * * 6"
workflow_dispatch:
jobs:
pages:
runs-on: ubuntu-latest
container: node:lts-alpine
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
apk update
apk add brotli curl git grep
- name: Build
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 {} \;
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
- name: 'Upload Public Folder'
uses: actions/upload-artifact@v2
with:
name: public
path: ./public
retention-days: 30
- name: 'Upload Tmp Folder'
uses: actions/upload-artifact@v2
with:
name: tmp
path: ./tmp
retention-days: 30