Skip to content

Can we cache teleport code to speedup checkout? #232

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
35 changes: 35 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 1
frontend:
phases:
preBuild:
commands:
# Setup Swapfile to work around lack of RAM on build node
# https://github.com/aws-amplify/amplify-hosting/issues/654
- echo "Setting up swap space..."
- sudo fallocate -l 40G ../swapfile
- sudo chmod 600 ../swapfile
- sudo mkswap ../swapfile
- sudo swapon ../swapfile
- sudo swapon -s
- echo "✅ Done setting up swap space!"
# install yarn dependencies
- yarn
- echo "Setting up content cache"
- |
if [ -d ./cached_content ]; then
rm -rf content/
else
mv content/ cached_content/
fi
- ln -s cached_content/ content
build:
commands:
- yarn build --out-dir build/docs/
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- cached_content/**/*
Loading