Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 8a91d33

Browse files
committed
Deploy to GitHub Pages
Added a workflow to deploy static content to Pages.
1 parent 90558a0 commit 8a91d33

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/deploy_pages.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- gh-pages
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow one concurrent deployment
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: true
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- name: Setup Python
35+
uses: actions/setup-python@v2
36+
- name: Install dependencies
37+
run: |
38+
pip install sphinx sphinx_rtd_theme myst_parser
39+
- name: Build documents
40+
run: |
41+
LANGUAGE=en make html
42+
LANGUAGE=ua make html
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v2
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v1
47+
with:
48+
# Upload entire repository
49+
path: "."
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v1

index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313
<body>
1414
<div style="text-align: center; margin-top: 75px">
1515
<h1>Python Training Course</h1>
16+
<h2>Course Materials</h2>
17+
<ul>
18+
<li>
19+
<!--suppress HtmlUnknownTarget -->
20+
<a href="_build/html/en/index.html">English version</a></li>
21+
<li>
22+
<!--suppress HtmlUnknownTarget -->
23+
<a href="_build/html/ua/index.html">Ukrainian version</a>
24+
</li>
25+
</ul>
1626
</div>
1727
</body>
1828
</html>

0 commit comments

Comments
 (0)