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

42 lines
1.1 KiB
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-21 13:56:45 +00:00
- name: 'Upload Public Folder'
2022-01-09 08:54:36 +00:00
uses: actions/upload-artifact@v2
with:
2022-01-21 13:56:45 +00:00
name: public
path: ./public
retention-days: 30
- name: 'Upload Tmp Folder'
uses: actions/upload-artifact@v2
with:
name: tmp
path: ./tmp
2022-01-09 08:54:36 +00:00
retention-days: 30