Skip to content

production deploy #1047

production deploy

production deploy #1047

Workflow file for this run

name: production deploy
on:
push:
branches:
- master
schedule:
- cron: '20 7 * * *'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.23.2'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- run: yarn run test
- name: generate
run: |
echo "GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}" >> .env.production
echo "GTM_CONTAINER_ID=${GTM_CONTAINER_ID}" >> .env.production
cat .env.production
yarn run generate:deploy
env:
GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
GTM_CONTAINER_ID: ${{ secrets.GTM_CONTAINER_ID }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: production