-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.71 KB
/
run.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Update artiweb
on:
workflow_dispatch:
push:
branches: ["main"]
schedule:
# Runs "at minute 55 past every hour" (see https://crontab.guru)
- cron: '55 * * * *'
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Check out code using git
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- run: file tmp/*
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- run: python download.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRIVATE_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
- run: python generate.py
env:
BASE_URL: artiweb
- run: python render.py
# weigl: quick fix!
- run: find -type f -size +99M -delete
- uses: EndBug/add-and-commit@v9
with:
add: 'pull-requests meta'
author_name: Kiki
author_email: [email protected]
default_author: github_actions
message: 'Auto-Commit'
pull: '--rebase --autostash'
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1