summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/pr-check.yml27
-rw-r--r--.gitignore3
-rw-r--r--amplify.yml27
3 files changed, 56 insertions, 1 deletions
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
new file mode 100644
index 0000000..90dafff
--- /dev/null
+++ b/.github/workflows/pr-check.yml
@@ -0,0 +1,27 @@
+name: PR build check
+
+on:
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install cmark
+ run: sudo apt-get update && sudo apt-get install -y cmark
+
+ - name: Install Dart Sass
+ run: npm install -g sass@1.32.8
+
+ - name: Install soupault
+ run: |
+ wget -q https://github.com/PataphysicalSociety/soupault/releases/download/4.10.0/soupault-4.10.0-linux-x86_64.tar.gz
+ tar xf soupault-4.10.0-linux-x86_64.tar.gz
+ sudo mv soupault-4.10.0-linux-x86_64/soupault /usr/bin/
+
+ - name: Build (staging profile)
+ run: SOUPAULT_OPTS="--profile staging" make all
diff --git a/.gitignore b/.gitignore
index 19b1651..33d03ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
build/*
index.json
-.soupault-cache/ \ No newline at end of file
+.soupault-cache/
+.worktrees/ \ No newline at end of file
diff --git a/amplify.yml b/amplify.yml
new file mode 100644
index 0000000..5c0053c
--- /dev/null
+++ b/amplify.yml
@@ -0,0 +1,27 @@
+version: 1
+applications:
+ - frontend:
+ phases:
+ preBuild:
+ commands:
+ - export GH_ACCESS_TOKEN=$(aws ssm get-parameter --name /amplify/shared/d224keb5xu0spt/GH_ACCESS_TOKEN --query Parameter.Value --output text --with-decryption)
+ - sudo yum install -y https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/c/cmark-0.29.0-4.el9.x86_64.rpm
+ - npm install -g sass@1.32.8
+ - python3 -m venv .venv
+ - source .venv/bin/activate
+ - pip install pygithub jinja2
+ - wget https://github.com/PataphysicalSociety/soupault/releases/download/4.10.0/soupault-4.10.0-linux-x86_64.tar.gz
+ - tar xvf soupault-4.10.0-linux-x86_64.tar.gz
+ - mv -v ./soupault-4.10.0-linux-x86_64/soupault /usr/bin/
+ build:
+ commands:
+ - source .venv/bin/activate
+ - 'if [ "$AWS_BRANCH" = "production" ]; then export SOUPAULT_OPTS="--profile live"; else export SOUPAULT_OPTS="--profile staging"; fi'
+ - make all
+ artifacts:
+ baseDirectory: /build
+ files:
+ - '**/*'
+ cache:
+ paths:
+ - node_modules/**/*