Skip to content

Commit

Permalink
Moved website contents & updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
npanuhin committed Dec 24, 2023
1 parent 9bf5085 commit 74a0764
Show file tree
Hide file tree
Showing 37 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/src/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down
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
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.
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.
19 changes: 11 additions & 8 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/postprocess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion 2020/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h6 align="center">by <a href="https://github.com/npanuhin">@npanuhin</a></h6>

<div align="center">
<img src="../docs/2020/canvas.svg">
<img src="../.github/website/2020/canvas.svg">
</div>

---
Expand Down
2 changes: 1 addition & 1 deletion 2021/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h6 align="center">by <a href="https://github.com/npanuhin">@npanuhin</a></h6>

<div align="center">
<img src="../docs/2021/canvas.svg">
<img src="../.github/website/2021/canvas.svg">
</div>

---
Expand Down
2 changes: 1 addition & 1 deletion 2023/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h6 align="center">by <a href="https://github.com/npanuhin">@npanuhin</a></h6>

<!-- <div align="center">
<img src="../docs/2023/canvas.svg">
<img src="../.github/website/2023/canvas.svg">
</div> -->

---
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h6 align="center">by <a href="https://github.com/npanuhin">@npanuhin</a></h6>

<div align="center">
<img src="docs/AoC.gif" width="600px">
<img src=".github/website/AoC.gif" width="600px">
</div>

---
Expand Down Expand Up @@ -201,8 +201,8 @@ I try to optimize each solution as much as possible, so although they are writte

<table>
<tr>
<td align="center"><a href="2020"><img src="docs/2020/canvas.svg"><h3>2020</h3></a></td>
<td align="center"><a href="2021"><img src="docs/2021/canvas.svg"><h3>2021</h3></a></td>
<td align="center"><a href="2020"><img src=".github/website/2020/canvas.svg"><h3>2020</h3></a></td>
<td align="center"><a href="2021"><img src=".github/website/2021/canvas.svg"><h3>2021</h3></a></td>
</tr>
</table>

Expand Down

0 comments on commit 74a0764

Please sign in to comment.