name: Build and Deploy

on:
  push:
    branches:
      - master

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

    - name: vuepress-deploy
      uses: IT4Change/vuepress-build-and-deploy@master
      env:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        TARGET_REPO: IT4Change/IT4C.dev
        TARGET_BRANCH: gh-pages
        BUILD_SCRIPT: npm install && npm run build -- --config docs/.vuepress/config github.js
        BUILD_DIR: docs/.vuepress/dist
