Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Astro for site building #97

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.