Skip to content

Commit

Permalink
Use Astro for site building
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Bjerhem Aronsson <[email protected]>
  • Loading branch information
GAsplund and Supergamer1337 committed Sep 4, 2023
1 parent 6902c4b commit 26c48a4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 61 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,28 @@ jobs:
find ./pdfs -mindepth 2 -type f -print -exec mv {} ./pdfs \;
find ./pdfs -type d -empty -delete
- name: Create pdf index
- name: Clean all files and folders except .pdfs
run: |
echo "$(cat upper_template.html)" > pdfs/index.html
cd pdfs
for f in *.pdf; do
echo "<a href=\"$f\"><li>$f</li></a>" >> index.html
done
echo "</ul></body></html>" >> index.html
find . -not -path "./pdfs/*" -not -name "pdfs" -not -name "." -delete
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Checkout site repository
uses: actions/checkout@v3
with:
path: './pdfs'
repository: cthit/dokument-site
path: site

- name: Move .pdfs to public folder
run: |
mkdir site/public
mv pdfs/* site/public/
rm -rf pdfs
- name: Install, build and upload site output
uses: withastro/action@v0
with:
path: site
package-manager: pnpm

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Dokument tillhörande Teknologsektionen Informationsteknik på Chalmers tekniska högskola. Det inkluderar bl.a. styrdokument och riktlinjer.

De publicerade dokumenten kan hittas på https://docs.chalmers.it/. Nya ändringar är publiceras automatiskt när de pushas till master-branchen.
Sidan är byggd med hjälp av [Astro](https://astro.build/), som är en statisk webbsidesgenerator.
Repot för sidan finns [här](https://github.com/cthit/dokument-site).

## Göra ändringar

Expand Down
51 changes: 0 additions & 51 deletions upper_template.html

This file was deleted.

0 comments on commit 26c48a4

Please sign in to comment.