-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from OlenaYefymenko/gh-actions-setup
Gh actions setup
- Loading branch information
Showing
20 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
|
||
name: Build website and publish to GH pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: 👷 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Switch to Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Check out src from Git | ||
uses: actions/checkout@v3 | ||
- name: Install Lektor from PyPI | ||
run: >- | ||
python -m | ||
pip install | ||
--user | ||
-r requirements.in | ||
-c requirements.txt | ||
- name: Generate the static website | ||
run: >- | ||
~/.local/bin/lektor | ||
build | ||
--verbose | ||
--output-path www | ||
- name: Save the generated HTML output as a GitHub Actions artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: www | ||
|
||
publish: | ||
name: 📢 | ||
needs: | ||
- build | ||
if: github.event_name != 'pull_request' | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: gh-pages | ||
url: https://olenayefymenko.github.io/blog | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Publish the Lektor website to GH Pages | ||
uses: actions/deploy-pages@v2 | ||
|
||
notify-google: | ||
name: 📝 | ||
needs: | ||
- publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Wait 2 minutes for GitHub Pages to invalidate the cache | ||
run: sleep 120 | ||
- name: Ping Google about the updated sitemap | ||
run: >- | ||
curl https://google.com/ping?sitemap=https://olenayefymenko.github.io/blog/sitemap.xml | ||
- name: Ping Google about the updated RSS feed | ||
run: >- | ||
curl https://google.com/ping?sitemap=https://olenayefymenko.github.io/blog/feed.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
indentation: | ||
level: error | ||
indent-sequences: false | ||
|
||
... |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Lektor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.11 | ||
# by the following command: | ||
# | ||
# pip-compile requirements.in | ||
# | ||
babel==2.12.1 | ||
# via lektor | ||
blinker==1.6.2 | ||
# via flask | ||
certifi==2023.7.22 | ||
# via requests | ||
charset-normalizer==3.2.0 | ||
# via requests | ||
click==8.1.7 | ||
# via | ||
# flask | ||
# lektor | ||
exifread==3.0.0 | ||
# via lektor | ||
filetype==1.2.0 | ||
# via lektor | ||
flask==2.3.3 | ||
# via lektor | ||
idna==3.4 | ||
# via requests | ||
inifile==0.4.1 | ||
# via lektor | ||
itsdangerous==2.1.2 | ||
# via flask | ||
jinja2==3.1.2 | ||
# via | ||
# flask | ||
# lektor | ||
lektor==3.3.10 | ||
# via -r requirements.in | ||
markupsafe==2.1.3 | ||
# via | ||
# jinja2 | ||
# lektor | ||
# werkzeug | ||
mistune==0.8.4 | ||
# via lektor | ||
python-slugify==8.0.1 | ||
# via lektor | ||
pytz==2023.3 | ||
# via lektor | ||
requests==2.31.0 | ||
# via lektor | ||
text-unidecode==1.3 | ||
# via python-slugify | ||
urllib3==2.0.4 | ||
# via requests | ||
watchdog==3.0.0 | ||
# via lektor | ||
werkzeug==2.3.7 | ||
# via | ||
# flask | ||
# lektor | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# pip | ||
# setuptools |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.