Deploy #983
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: Deploy | |
concurrency: | |
group: production | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: '0 0 1-31/2 * * ' | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
environment: | |
name: production | |
url: https://scorecard.progressivemass.com | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '16.19.0' | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install | |
- name: Deploy site | |
env: | |
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
OPENSTATES_API_KEY: ${{ secrets.OPENSTATES_API_KEY }} | |
GATSBY_SERVERLESS_ENDPOINT: ${{ vars.GATSBY_SERVERLESS_ENDPOINT }} | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
GATSBY_DOMAIN: ${{ vars.GATSBY_DOMAIN }} | |
run: yarn run deploy:prod |