-
Notifications
You must be signed in to change notification settings - Fork 26
63 lines (59 loc) · 1.55 KB
/
release.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
name: Release the result
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
# Runs at 16:00 UTC (BeiJing 00:00) on the 1st of every month
schedule:
- cron: '0 16 1 * *'
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-22.04
name: release html
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install Tools
shell: bash
run: |
sudo apt-get update
sudo python -m pip install --upgrade pip -qq
sudo apt-get install zip
pip install sphinx
pip install sphinx-autobuild
pip install sphinx_rtd_theme
pip install recommonmark
pip install sphinx_markdown_tables
pip install requests -qq
- name: build Compile
shell: bash
run: |
make html
ls -la build/
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@main
with:
path: build/html/
# Deployment job
deploy:
if: github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4