-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.75 KB
/
deploy.yml
File metadata and controls
44 lines (41 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Huge thx to https://github.com/ad-m/github-push-action
name: Deploy Site on fschatbot.github.io
on:
push:
branch: [master]
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Minify Each File
run: |
npm install
npx terser cookies.js -o cookies.min.js -c --ecma 5 --ie8 --timings
npx terser data_recorder.js -o data_recorder.min.js -c --ecma 5 --ie8 --timings
npx terser EssentialJS.js -o EssentialJS.min.js -c --ecma 5 --ie8 --timings
npx terser internet.js -o internet.min.js -c --ecma 5 --ie8 --timings
npx terser Right_click.js -o Right_click.min.js -c --ecma 5 --ie8 --timings
npx terser Timer.js -o Timer.min.js -c --ecma 5 --ie8 --timings
- name: Commit files
run: |
rm -rf .git
git init
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -f cookies.js data_recorder.js EssentialJS.js internet.js Right_click.js Timer.js
git add -f cookies.min.js data_recorder.min.js EssentialJS.min.js internet.min.js Right_click.min.js Timer.min.js
git commit -m "Upgraded till commit: ${{ github.event.commits[0].id }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
force: true