From 74a07649dc789a26b8f176fee15ab90a87db549e Mon Sep 17 00:00:00 2001 From: Nikita Panyuhin Date: Sun, 24 Dec 2023 23:47:01 +0100 Subject: [PATCH] Moved website contents & updated workflow --- .github/src/postprocess.py | 4 ++-- {docs => .github/website}/2020/canvas.svg | 0 {docs => .github/website}/2020/index.html | 0 {docs => .github/website}/2021/canvas.svg | 0 {docs => .github/website}/2021/index.html | 0 {docs => .github/website}/2023/index.html | 0 {docs => .github/website}/AoC.gif | Bin {docs => .github/website}/CNAME | 0 .../favicon/android-chrome-192x192.png | Bin .../favicon/android-chrome-256x256.png | Bin .../favicon/apple-touch-icon-120x120.png | Bin .../favicon/apple-touch-icon-152x152.png | Bin .../favicon/apple-touch-icon-180x180.png | Bin .../favicon/apple-touch-icon-60x60.png | Bin .../favicon/apple-touch-icon-76x76.png | Bin .../website}/favicon/apple-touch-icon.png | Bin .../website}/favicon/browserconfig.xml | 0 .../website}/favicon/favicon-16x16.png | Bin .../website}/favicon/favicon-194x194.png | Bin .../website}/favicon/favicon-32x32.png | Bin {docs => .github/website}/favicon/favicon.ico | Bin {docs => .github/website}/favicon/favicon.png | Bin .../website}/favicon/mstile-144x144.png | Bin .../website}/favicon/mstile-150x150.png | Bin .../website}/favicon/mstile-310x150.png | Bin .../website}/favicon/mstile-310x310.png | Bin .../website}/favicon/mstile-70x70.png | Bin .../website}/favicon/safari-pinned-tab.svg | 0 .../website}/favicon/site.webmanifest | 0 {docs => .github/website}/index.html | 0 {docs => .github/website}/main.css | 0 .github/workflows/pages.yml | 19 ++++++++++-------- .github/workflows/postprocess.yaml | 1 + 2020/README.md | 2 +- 2021/README.md | 2 +- 2023/README.md | 2 +- README.md | 6 +++--- 37 files changed, 20 insertions(+), 16 deletions(-) rename {docs => .github/website}/2020/canvas.svg (100%) rename {docs => .github/website}/2020/index.html (100%) rename {docs => .github/website}/2021/canvas.svg (100%) rename {docs => .github/website}/2021/index.html (100%) rename {docs => .github/website}/2023/index.html (100%) rename {docs => .github/website}/AoC.gif (100%) rename {docs => .github/website}/CNAME (100%) rename {docs => .github/website}/favicon/android-chrome-192x192.png (100%) rename {docs => .github/website}/favicon/android-chrome-256x256.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon-120x120.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon-152x152.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon-180x180.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon-60x60.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon-76x76.png (100%) rename {docs => .github/website}/favicon/apple-touch-icon.png (100%) rename {docs => .github/website}/favicon/browserconfig.xml (100%) rename {docs => .github/website}/favicon/favicon-16x16.png (100%) rename {docs => .github/website}/favicon/favicon-194x194.png (100%) rename {docs => .github/website}/favicon/favicon-32x32.png (100%) rename {docs => .github/website}/favicon/favicon.ico (100%) rename {docs => .github/website}/favicon/favicon.png (100%) rename {docs => .github/website}/favicon/mstile-144x144.png (100%) rename {docs => .github/website}/favicon/mstile-150x150.png (100%) rename {docs => .github/website}/favicon/mstile-310x150.png (100%) rename {docs => .github/website}/favicon/mstile-310x310.png (100%) rename {docs => .github/website}/favicon/mstile-70x70.png (100%) rename {docs => .github/website}/favicon/safari-pinned-tab.svg (100%) rename {docs => .github/website}/favicon/site.webmanifest (100%) rename {docs => .github/website}/index.html (100%) rename {docs => .github/website}/main.css (100%) diff --git a/.github/src/postprocess.py b/.github/src/postprocess.py index eaf1c75..cf4f497 100644 --- a/.github/src/postprocess.py +++ b/.github/src/postprocess.py @@ -94,11 +94,11 @@ def main(): # Handle year README and webpage gen_year_table(year) - gen_year_page(year, mkpath('../../docs/', year.year, 'index.html')) + gen_year_page(year, f'../website/{year.year}/index.html') # Handle global README and webpage gen_global_table(solved, '../../README.md') - gen_global_page(solved, '../../docs/index.html') + gen_global_page(solved, '../website/index.html') if __name__ == '__main__': diff --git a/docs/2020/canvas.svg b/.github/website/2020/canvas.svg similarity index 100% rename from docs/2020/canvas.svg rename to .github/website/2020/canvas.svg diff --git a/docs/2020/index.html b/.github/website/2020/index.html similarity index 100% rename from docs/2020/index.html rename to .github/website/2020/index.html diff --git a/docs/2021/canvas.svg b/.github/website/2021/canvas.svg similarity index 100% rename from docs/2021/canvas.svg rename to .github/website/2021/canvas.svg diff --git a/docs/2021/index.html b/.github/website/2021/index.html similarity index 100% rename from docs/2021/index.html rename to .github/website/2021/index.html diff --git a/docs/2023/index.html b/.github/website/2023/index.html similarity index 100% rename from docs/2023/index.html rename to .github/website/2023/index.html diff --git a/docs/AoC.gif b/.github/website/AoC.gif similarity index 100% rename from docs/AoC.gif rename to .github/website/AoC.gif diff --git a/docs/CNAME b/.github/website/CNAME similarity index 100% rename from docs/CNAME rename to .github/website/CNAME diff --git a/docs/favicon/android-chrome-192x192.png b/.github/website/favicon/android-chrome-192x192.png similarity index 100% rename from docs/favicon/android-chrome-192x192.png rename to .github/website/favicon/android-chrome-192x192.png diff --git a/docs/favicon/android-chrome-256x256.png b/.github/website/favicon/android-chrome-256x256.png similarity index 100% rename from docs/favicon/android-chrome-256x256.png rename to .github/website/favicon/android-chrome-256x256.png diff --git a/docs/favicon/apple-touch-icon-120x120.png b/.github/website/favicon/apple-touch-icon-120x120.png similarity index 100% rename from docs/favicon/apple-touch-icon-120x120.png rename to .github/website/favicon/apple-touch-icon-120x120.png diff --git a/docs/favicon/apple-touch-icon-152x152.png b/.github/website/favicon/apple-touch-icon-152x152.png similarity index 100% rename from docs/favicon/apple-touch-icon-152x152.png rename to .github/website/favicon/apple-touch-icon-152x152.png diff --git a/docs/favicon/apple-touch-icon-180x180.png b/.github/website/favicon/apple-touch-icon-180x180.png similarity index 100% rename from docs/favicon/apple-touch-icon-180x180.png rename to .github/website/favicon/apple-touch-icon-180x180.png diff --git a/docs/favicon/apple-touch-icon-60x60.png b/.github/website/favicon/apple-touch-icon-60x60.png similarity index 100% rename from docs/favicon/apple-touch-icon-60x60.png rename to .github/website/favicon/apple-touch-icon-60x60.png diff --git a/docs/favicon/apple-touch-icon-76x76.png b/.github/website/favicon/apple-touch-icon-76x76.png similarity index 100% rename from docs/favicon/apple-touch-icon-76x76.png rename to .github/website/favicon/apple-touch-icon-76x76.png diff --git a/docs/favicon/apple-touch-icon.png b/.github/website/favicon/apple-touch-icon.png similarity index 100% rename from docs/favicon/apple-touch-icon.png rename to .github/website/favicon/apple-touch-icon.png diff --git a/docs/favicon/browserconfig.xml b/.github/website/favicon/browserconfig.xml similarity index 100% rename from docs/favicon/browserconfig.xml rename to .github/website/favicon/browserconfig.xml diff --git a/docs/favicon/favicon-16x16.png b/.github/website/favicon/favicon-16x16.png similarity index 100% rename from docs/favicon/favicon-16x16.png rename to .github/website/favicon/favicon-16x16.png diff --git a/docs/favicon/favicon-194x194.png b/.github/website/favicon/favicon-194x194.png similarity index 100% rename from docs/favicon/favicon-194x194.png rename to .github/website/favicon/favicon-194x194.png diff --git a/docs/favicon/favicon-32x32.png b/.github/website/favicon/favicon-32x32.png similarity index 100% rename from docs/favicon/favicon-32x32.png rename to .github/website/favicon/favicon-32x32.png diff --git a/docs/favicon/favicon.ico b/.github/website/favicon/favicon.ico similarity index 100% rename from docs/favicon/favicon.ico rename to .github/website/favicon/favicon.ico diff --git a/docs/favicon/favicon.png b/.github/website/favicon/favicon.png similarity index 100% rename from docs/favicon/favicon.png rename to .github/website/favicon/favicon.png diff --git a/docs/favicon/mstile-144x144.png b/.github/website/favicon/mstile-144x144.png similarity index 100% rename from docs/favicon/mstile-144x144.png rename to .github/website/favicon/mstile-144x144.png diff --git a/docs/favicon/mstile-150x150.png b/.github/website/favicon/mstile-150x150.png similarity index 100% rename from docs/favicon/mstile-150x150.png rename to .github/website/favicon/mstile-150x150.png diff --git a/docs/favicon/mstile-310x150.png b/.github/website/favicon/mstile-310x150.png similarity index 100% rename from docs/favicon/mstile-310x150.png rename to .github/website/favicon/mstile-310x150.png diff --git a/docs/favicon/mstile-310x310.png b/.github/website/favicon/mstile-310x310.png similarity index 100% rename from docs/favicon/mstile-310x310.png rename to .github/website/favicon/mstile-310x310.png diff --git a/docs/favicon/mstile-70x70.png b/.github/website/favicon/mstile-70x70.png similarity index 100% rename from docs/favicon/mstile-70x70.png rename to .github/website/favicon/mstile-70x70.png diff --git a/docs/favicon/safari-pinned-tab.svg b/.github/website/favicon/safari-pinned-tab.svg similarity index 100% rename from docs/favicon/safari-pinned-tab.svg rename to .github/website/favicon/safari-pinned-tab.svg diff --git a/docs/favicon/site.webmanifest b/.github/website/favicon/site.webmanifest similarity index 100% rename from docs/favicon/site.webmanifest rename to .github/website/favicon/site.webmanifest diff --git a/docs/index.html b/.github/website/index.html similarity index 100% rename from docs/index.html rename to .github/website/index.html diff --git a/docs/main.css b/.github/website/main.css similarity index 100% rename from docs/main.css rename to .github/website/main.css diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index fcbd7c1..8298067 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,13 +1,16 @@ +# GitHub Pages deployment is always performed after the "Postprocess" workflow that runs for each commit + name: Deploy static content to Pages on: - # push: - # branches: ["master"] - workflow_run: - workflows: ["Postprocess"] - types: - - completed - + push: + branches: ["master"] + paths: + - .github/website/** + # workflow_run: + # workflows: ["Postprocess"] + # types: + # - completed workflow_dispatch: permissions: @@ -35,7 +38,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: - path: 'docs' + path: '.github/website' - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/postprocess.yaml b/.github/workflows/postprocess.yaml index d8a90de..21d3de7 100644 --- a/.github/workflows/postprocess.yaml +++ b/.github/workflows/postprocess.yaml @@ -19,6 +19,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 2 # To be able to `commit --amend` + token: ${{ secrets.GH_PAT }} - name: Get changed files if: github.event_name == 'push' diff --git a/2020/README.md b/2020/README.md index 0da255f..3f2c203 100644 --- a/2020/README.md +++ b/2020/README.md @@ -2,7 +2,7 @@
by @npanuhin
- +
--- diff --git a/2021/README.md b/2021/README.md index d53da7f..6a83dd3 100644 --- a/2021/README.md +++ b/2021/README.md @@ -2,7 +2,7 @@
by @npanuhin
- +
--- diff --git a/2023/README.md b/2023/README.md index 231f0b2..3da99c2 100644 --- a/2023/README.md +++ b/2023/README.md @@ -2,7 +2,7 @@
by @npanuhin
--- diff --git a/README.md b/README.md index e33eed4..56360fd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
by @npanuhin
- +
--- @@ -201,8 +201,8 @@ I try to optimize each solution as much as possible, so although they are writte - - + +

2020

2021

2020

2021