-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (48 loc) · 1.55 KB
/
publish.yml
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
45
46
47
48
49
50
51
52
53
54
55
name: GitHub Pages
on:
push:
branches:
- main
schedule:
# cronjob that triggers every day at 3PM UTC
- cron: '0 15 * * *'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Checkout YimMenu
uses: actions/checkout@v3
with:
repository: YimMenu/YimMenu
path: YimMenu
fetch-depth: 0
- name: Set up git-cliff
uses: kenji-miyake/setup-git-cliff@v1
- name: Generate Changelog
run: |
mv .github/changelog_generator.js YimMenu
mv .github/cliff.toml YimMenu
mv .github/replace.js .
cd YimMenu
git log --format="%cs#%H" | node changelog_generator.js
cd ..
cp YimMenu/changelog.md .
cp changelog.md changelog.txt
npx --yes showdown makehtml -i changelog.md -o changelog_from_md.html
node replace.js
rm -rf *.js *.template.html .github/ changelog_from_md.html YimMenu/
curl -o ./coi-serviceworker.min.js https://raw.githubusercontent.com/gzuidhof/coi-serviceworker/27a76b676c67202fb227deb97f9d911d41f55965/coi-serviceworker.min.js
- run: rm .gitignore
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
force_orphan: true