summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-04-19 02:18:12 +0300
committerGitHub <noreply@github.com>2026-04-19 02:18:12 +0300
commite4bcc3e531f9c640d75cfefb8db320fe606013bc (patch)
treeac0ae796027a036fcb23b94c32311d723d427819
parenta9370ae5ff84623b8506960965dc2b19f4f6a550 (diff)
parent6fc03e22ea2214512d2c6098ca34442d61a13560 (diff)
downloadcommunity.vyos.net-e4bcc3e531f9c640d75cfefb8db320fe606013bc.tar.gz
community.vyos.net-e4bcc3e531f9c640d75cfefb8db320fe606013bc.zip
Merge pull request #46 from vyos/feature/amplify-profiles-pr-checks
build: profile-gate Amplify builds; add PR check workflow
-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/**/*