-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
84 lines (74 loc) · 2.71 KB
/
action.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
73
74
75
76
77
78
79
80
81
82
83
84
name: "Build Alteza Website on GitHub Pages"
branding:
icon: 'book-open'
color: 'green'
description: "A simple GitHub action that builds and deploys an Alteza website to GitHub pages"
author: "Arjun G. Menon"
inputs:
path:
description: "Path of the directory containing the input Alteza content."
required: true
outputs:
page_url:
description: 'URL to the deployed GitHub Pages'
value: ${{ steps.deployment.outputs.page_url }}
runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install dependencies
shell: bash
run: |
python -m pip install -q --upgrade pip
#
# Once this is stable, switch to installing a specific tagging version.
# Eventually, will need to adopt a version cadence approach in order to
# avoid releasing an updated `action.yml` before the PyPI had updated.
# One possible approach: use odd-numbered patch versions for actual
# features/code updates, and immediately follow every odd-numbered
# patch version release with an _even-numbered_ patch version
# release that is limited to documentation and `action.yml`.
#
# pip install -q git+https://github.com/arjun-menon/alteza.git@master
pip install -q alteza==0.8.8
- name: Generate
shell: bash
env:
INPUT_PATH: ${{ inputs.path }}
run: |
echo Generating with Alteza...
echo PWD: `pwd`
alteza --content "$INPUT_PATH" --output alteza-output
- name: Upload website ZIP file
uses: actions/upload-artifact@v4
with:
name: alteza-output
path: alteza-output
- name: Configure GitHub Pages
id: gh_pages_config
uses: actions/configure-pages@v4
with:
enablement: true
- name: Display output of the GitHub Pages configuration step
env:
GH_PAGES_BASE_URL: ${{ steps.gh_pages_config.outputs.base_url }}
GH_PAGES_BASE_ORIGIN: ${{ steps.gh_pages_config.outputs.origin }}
GH_PAGES_BASE_HOST: ${{ steps.gh_pages_config.outputs.host }}
GH_PAGES_BASE_PATH: ${{ steps.gh_pages_config.outputs.base_path }}
shell: bash
run: |
echo "GitHub Pages site full base URL: $GH_PAGES_BASE_URL"
echo "GitHub Pages site origin: $GH_PAGES_BASE_ORIGIN"
echo "GitHub Pages site origin: $GH_PAGES_BASE_HOST"
echo "GitHub Pages site full base path: $GH_PAGES_BASE_PATH"
- name: Upload artifact to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: alteza-output
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4