Add some random canvas playground things #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Pull Request Actions' | |
on: | |
pull_request: | |
# Only initiate the workflow when a PR is opened, or committed to. | |
branches: | |
- main | |
jobs: | |
testAndDeploy: | |
name: 'Test and Deploy' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
# Cache yarn packages | |
- uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-cache-v1-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-cache-v1- | |
- name: Install dependencies for root and svelte | |
run: yarn && yarn i:svelte | |
- name: Run tests | |
run: yarn test | |
- name: Build the svelte site | |
run: yarn svelte:build | |
- name: Deploy to Netlify | |
uses: nwtgck/actions-netlify@v2.1 | |
with: | |
publish-dir: './svelte/build' | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: '${{ github.event.pull_request.title }} Deploy Preview' | |
enable-pull-request-comment: false | |
enable-commit-comment: false | |
overwrites-pull-request-comment: false | |
github-deployment-description: 'Netlify Deploy Preview' | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |