Refresh site #106307
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: Refresh site | |
on: | |
repository_dispatch: | |
schedule: | |
- cron: '*/15 7-23 * * *' | |
jobs: | |
refresh: | |
name: Refresh site | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Set up Node 16.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16' | |
- name: Cache node_modules | |
uses: actions/cache@v1 | |
id: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | |
- name: Set up dependencies | |
if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }} | |
run: yarn install | |
- name: Build site | |
run: yarn run build | |
env: | |
NODE_ENV: production | |
- name: Publish site | |
uses: JamesIves/[email protected] | |
id: publish | |
with: | |
branch: gh-pages | |
folder: dist | |
git-config-name: vlctechhub[bot] | |
git-config-email: [email protected] | |
single-commit: true | |
- name: Report published items | |
if: ${{ steps.publish.outputs.deployment-status == 'success' }} | |
run: yarn run report-published | |
env: | |
NODE_ENV: production |