forked from TeamDevDev/www.developerdevelopment.com
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.73 KB
/
publish.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
# Basic workflow
name: Publish
# Controls when the action will run
# Workflow begins with push or PR events
# Focuses on the master branch only
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
# Jobs for setup, rendering, and publishing
# for the web site, using Python, Poetry,
# and the Quarto publishing system
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
# Repository
- name: Check out Repository
uses: actions/checkout@v3
with:
submodules: true
# Install Quarto
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.5.56
# Install Python
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
# Install Poetry
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.8.3
# Setup the Virtual Environment
- name: Setup Virtual Environment
run: |
poetry install
# Render and Publish the Site
# Note that this uses Quarto to
# directly publish the site, which
# means that you do not use Netlify
# build minutes. This is great! Yet,
# it also means that you do not get
# a Netlify preview build for PRs.
- name: Render and Publish
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
PYDEVD_DISABLE_FILE_VALIDATION: 1
run: |
quarto --version
# directly publish a version of the site to Netlify, using
# the optimize profile that will perform minification
poetry run quarto publish netlify --profile optimize