set up new trends site for fa24 #580
Workflow file for this run
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: CI | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2-beta | |
- uses: actions/cache@v2 | |
with: | |
path: ".yarn/cache\n.pnp.js" | |
key: "yarn-berry-${{ hashFiles('**/yarn.lock') }}" | |
restore-keys: 'yarn-berry-' | |
- name: Yarn Install | |
run: yarn install --immutable | |
- name: Run Prettier | |
run: 'yarn format:check' | |
- name: Build | |
run: yarn build | |
- name: Deploy to Netlify | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
run: netlify deploy --dir=build --site=$NETLIFY_SITE_ID --json > a.json | |
- name: Parse deployment URL | |
id: deploy_url | |
run: | | |
DEPLOY_URL=$(echo "console.log(require('./a.json').deploy_url)" | node) | |
echo "::set-output name=DEPLOY_URL::$DEPLOY_URL" | |
- uses: cornell-dti/dti-repo-tools@master | |
env: | |
BOT_TOKEN: '${{ secrets.BOT_TOKEN }}' | |
with: | |
command: pr-comment | |
argument: '[deployment-bot] Deployed to ${{steps.deploy_url.outputs.DEPLOY_URL}}.' |