Skip to content

Deploy Operate First Blog #1097

Deploy Operate First Blog

Deploy Operate First Blog #1097

Workflow file for this run

name: Deploy Operate First Blog
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: deploy_environment
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: npm ci
- run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name != 'schedule' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
- name: Deploy (scheduled)
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'schedule' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "deploy (scheduled): "