Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschaul committed May 20, 2024
1 parent 3516a52 commit 4874901
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,46 @@ jobs:
git commit -m "chore: update readme at ${timestamp}" || exit 0
git push
- name: Set up Python
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
uses: actions/setup-python@v5
with:
python-version: '3.10'

- uses: actions/cache@v4
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Playwright browsers
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright/
key: ${{ runner.os }}-browsers

- name: Install Python dependencies
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
run: |
pip install -r jump-start-gallery/requirements.txt
- name: Install Playwright dependencies
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
run: |
shot-scraper install
- name: Start server and take screenshots
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
run: |
mkdir -p jump-start-gallery/public/screenshots &&
npm run dev &
sleep 2 &&
npm run update-screenshots
- name: Build custom site
if: ${{ env.DEPLOY_CUSTOM_SITE == 'true' }}
env:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"storybook": "cd jump-start-gallery && JUMP_START_STARTERS=../ npm run storybook",
"build-storybook": "cd jump-start-gallery && JUMP_START_STARTERS=../ npm run build-storybook",
"update-readme": "cd jump-start-gallery && JUMP_START_STARTERS=../ npm run update-readme",
"update-screenshots": "cd jump-start-gallery && JUMP_START_STARTERS=../ npm run update-screenshots",
"gallery:clone": "git submodule update --init",
"gallery:update": "git submodule sync --recursive",
"gallery:install": "cd jump-start-gallery && npm install",
Expand All @@ -26,5 +27,6 @@
"bugs": {
"url": "https://github.com/kevinschaul/jump-start-template/issues"
},
"homepage": "https://github.com/kevinschaul/jump-start-template#readme"
"homepage": "https://github.com/kevinschaul/jump-start-template#readme",
"dependencies": {}
}

0 comments on commit 4874901

Please sign in to comment.