Skip to content

Commit

Permalink
Make GitHub pages (#68)
Browse files Browse the repository at this point in the history
* WIP Site

* hmm

* quadratic but fine for now

* try upload

* Run parallel

* Run parallel

* Run parallel

* Apply suggestions from code review

* Separate action

* upload locks
  • Loading branch information
arianvp authored Feb 13, 2024
1 parent a0fad0b commit 994aff2
Show file tree
Hide file tree
Showing 5 changed files with 1,991 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and deploy Github Pages
permissions:
contents: read
on:
push:
branches:
- main
env:
AWS_REGION: eu-central-1
jobs:
deploy-pages:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e # v9
- uses: DeterminateSystems/magic-nix-cache-action@eeabdb06718ac63a7021c6132129679a8e22d0c7 # v3
- uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 with:
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/upload-ami
aws-region: ${{ env.AWS_REGION }}
- name: Describe images
run: nix run .#describe-images > ./site/images.json
- name: Upload pages
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: ./site
- name: Deploy pages
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4
id: deployment
if: github.ref == 'refs/heads/main'

Loading

0 comments on commit 994aff2

Please sign in to comment.