-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.69 KB
/
deploy.yml
File metadata and controls
63 lines (52 loc) · 1.69 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
name: Static pages deployment
on:
push:
branches: ["main", "django-version"]
pull_request:
branches: ["main"]
permissions:
contents: write
pages: write
jobs:
tests:
name: "Build and deploy"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Install Poetry"
env:
POETRY_VERSION: "1.8.2"
run: |
pipx install poetry==${POETRY_VERSION}
which poetry
- uses: "actions/setup-python@v5"
with:
python-version: "3.12"
cache: 'poetry'
- name: "Install dependencies via Poetry"
run: poetry install --only=main,deployment
- name: "Build static pages and assets"
run: |
make build \
PYTHON_BINS="$(poetry env info --path)/bin" \
PYTHON="$(poetry env info --executable)" \
POETRY="$(which poetry)" \
POETRY_INSTALL_OPTS="--only=main,deployment"
env:
DEBUG: false
continue-on-error: false
- name: "Add CNAME for Github Pages"
run: echo "devblog.dunsap.com" > dist/CNAME
- name: "Deploy to Github Pages"
run: poetry run ghp-import --no-history --push --force dist/
- name: Notify my Github profile repo
env:
TOKEN: ${{ secrets.OLIVIERPHI_README_TRIGGER_GH_TOKEN }}
run: |-
curl \
--silent \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${TOKEN}" \
"https://api.github.com/repos/olivierphi/olivierphi/dispatches" \
-d '{"event_type":"devblog-gh-pages-pushed","client_payload":{"wait_for_deployment":true}}'