Repository navigation
64 lines (53 loc) · 1.54 KB
/
Copy pathmain.yml
File metadata and controls
64 lines (53 loc) · 1.54 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Website Automation
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
# Serialize builds on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
jobs:
images:
name: Deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: abatilo/actions-poetry@v4
with:
poetry-version: '2.4.1'
- name: Install Dependencies
run: poetry install
- name: Generate Webpages and Images
run: poetry run python scripts/automate.py
- name: Build Webpages with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: docs/
destination: docs/_site
token: ${{ secrets.GITHUB_TOKEN }}
# Don't rebuild the website when changes are pushed to gh-pages branch
# since that branch contains the built HTML pages. Also, make sure
# the CNAME is in the gh-pages branch
- name: Add .nojekyll and CNAME
run: |
sudo touch docs/_site/.nojekyll
sudo cp docs/CNAME docs/_site/
# Push the changes to the gh-pages branch
- name: Publish Site
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/_site
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' }}