Skip to content

chore: update post(s) via GitHub Actions #37

chore: update post(s) via GitHub Actions

chore: update post(s) via GitHub Actions #37

Workflow file for this run

name: Deploy website
on:
push:
branches:
- master
- main
paths:
- .knosys/sites/default/**
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
SITE_REPO: ourairyu/pro
SITE_BRANCH: gh-pages
steps:
- name: Create temp dirs
run: mkdir site-src site-dist
- uses: actions/checkout@v3
with:
path: site-src
- uses: actions/checkout@v3
with:
repository: ${{ env.SITE_REPO }}
ref: ${{ env.SITE_BRANCH }}
persist-credentials: false
path: site-dist
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 14.15.3
- run: cd site-src && npm i && npm run deploy ../site-dist && cd ..
- name: Commit changes
run: |
cd site-dist
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "chore: update via GitHub Actions"
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
repository: ${{ env.SITE_REPO }}
branch: ${{ env.SITE_BRANCH }}
directory: site-dist