-
Notifications
You must be signed in to change notification settings - Fork 111
45 lines (40 loc) · 1.14 KB
/
AutoUpdate.yml
File metadata and controls
45 lines (40 loc) · 1.14 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
45
name: AutoUpdate
on:
push:
branches:
- 'main'
- 'dev'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
repository: GoodManWEN/GoodManWEN.github.io
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 12
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build
run: |
git config --global core.quotepath false
git ls-files | while read file; do touch -d $(git log -1 --format="@%ct" "$file") "$file"; done
python3 generate.py
npm install
npm run build
- name: Commit files
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Action[Bot]"
git add -A
git commit -m "update built files after user commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}